2023-05-23 19:01:39 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import os, sys
|
|
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", ".."))
|
|
|
|
|
|
|
|
from binding_generator import get_file_list, generate_bindings
|
|
|
|
|
2023-05-31 13:28:14 +02:00
|
|
|
api_filepath = "pandemonium_headers/api.json"
|
2023-05-23 19:01:39 +02:00
|
|
|
bits = "64"
|
|
|
|
double = "float"
|
|
|
|
output_dir = "self_test"
|
|
|
|
|
|
|
|
generate_bindings(api_filepath, use_template_get_node=False, output_dir=output_dir)
|
|
|
|
flist = get_file_list(api_filepath, output_dir, headers=True, sources=True)
|
|
|
|
|
|
|
|
p = Path(output_dir)
|
|
|
|
allfiles = [str(f.as_posix()) for f in p.glob("**/*.*")]
|
|
|
|
missing = list(filter((lambda f: f not in flist), allfiles))
|
|
|
|
extras = list(filter((lambda f: f not in allfiles), flist))
|
|
|
|
if len(missing) > 0 or len(extras) > 0:
|
|
|
|
print("Error!")
|
|
|
|
for f in missing:
|
|
|
|
print("MISSING: " + str(f))
|
|
|
|
for f in extras:
|
|
|
|
print("EXTRA: " + str(f))
|
|
|
|
sys.exit(1)
|
|
|
|
else:
|
|
|
|
print("OK!")
|