-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_test_config.py
More file actions
42 lines (27 loc) · 974 Bytes
/
Copy pathbuild_test_config.py
File metadata and controls
42 lines (27 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
import shutil
import glob
import json
demo_paths = ['main.py'] + sorted([fpath for fpath in glob.glob("demos/*.py")])
test_paths = sorted( [fpath for fpath in glob.glob("test/uitest_*.py")]
+ [fpath for fpath in glob.glob("test/stresstest_*.py")] )
print("Found demos paths", demo_paths)
print()
print("Found tests paths", test_paths)
print()
demo_names = [os.path.split(dp)[1][:-3] for dp in demo_paths]
test_names = [os.path.split(t)[1][:-3] for t in test_paths]
with open('test/pyscript-test-template.json', encoding='utf-8') as fconf_template:
#TODO ADD CHECK
with open('pyscript-test.json', 'w', encoding='utf-8') as fconf_out:
jsonobj = json.load(fconf_template)
files = jsonobj["files"]
for test_path in test_paths:
files[test_path] = ""
json.dump(jsonobj,fconf_out, indent=4)
print(f'Wrote pyscript-test.json')
print()
print()
print('DONE.')
print()
print()