-
Notifications
You must be signed in to change notification settings - Fork 7
/
run_tests_local.py
executable file
·95 lines (80 loc) · 4.42 KB
/
run_tests_local.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env python3
import os, sys, subprocess
import traceback
PROJECTS=[
'https://github.com/defold/extension-spine/archive/master.zip',
'https://github.com/defold/extension-adinfo/archive/master.zip',
'https://github.com/defold/extension-admob/archive/master.zip',
'https://github.com/defold/extension-camera/archive/master.zip',
'https://github.com/defold/extension-facebook/archive/master.zip',
'https://github.com/defold/extension-fbinstant/archive/master.zip',
'https://github.com/defold/extension-firebase/archive/master.zip',
'https://github.com/defold/extension-firebase-analytics/archive/master.zip',
'https://github.com/defold/extension-firebase-remoteconfig/archive/master.zip',
'https://github.com/defold/extension-googleplayinstant/archive/master.zip',
'https://github.com/defold/extension-gpgs/archive/master.zip',
'https://github.com/defold/extension-html5/archive/master.zip',
'https://github.com/defold/extension-iac/archive/master.zip',
'https://github.com/defold/extension-iap/archive/master.zip',
'https://github.com/defold/extension-kaiads/archive/main.zip',
'https://github.com/defold/extension-kaios/archive/main.zip',
'https://github.com/defold/extension-crypt/archive/master.zip',
'https://github.com/defold/extension-poco/archive/master.zip',
'https://github.com/defold/extension-push/archive/master.zip',
'https://github.com/defold/extension-review/archive/master.zip',
'https://github.com/defold/extension-safearea/archive/master.zip',
'https://github.com/defold/extension-siwa/archive/master.zip',
'https://github.com/defold/extension-videoplayer-native/archive/master.zip',
'https://github.com/defold/extension-webmonetization/archive/master.zip',
'https://github.com/defold/extension-websocket/archive/master.zip',
'https://github.com/defold/extension-webview/archive/master.zip',
'https://github.com/defold/template-native-extension/archive/master.zip',
'https://github.com/britzl/defold-screenshot/archive/master.zip',
'https://github.com/britzl/defold-luasec/archive/master.zip',
'https://github.com/britzl/defold-sharing/archive/master.zip',
'https://github.com/britzl/extension-imgui/archive/master.zip',
'https://github.com/AGulev/DefVideoAds/archive/master.zip',
'https://github.com/subsoap/defos/archive/master.zip',
'https://github.com/Lerg/extension-directories/archive/master.zip',
'https://github.com/dapetcu21/defold-fmod/archive/master.zip',
'https://github.com/defold/extension-poki-sdk/archive/refs/heads/main.zip',
'https://github.com/defold/extension-ironsource/archive/refs/heads/main.zip',
'https://github.com/defold/extension-zendesk/archive/refs/heads/master.zip',
'https://github.com/defold/extension-steam/archive/refs/heads/master.zip',
'https://github.com/defold/extension-simpledata/archive/refs/heads/main.zip',
'https://github.com/defold/extension-permissions/archive/refs/heads/master.zip',
# Bob.jar plugins:
'https://github.com/defold/extension-lua-preprocessor/archive/refs/heads/main.zip',
'https://github.com/defold/extension-prometheus/archive/refs/heads/master.zip',
'https://github.com/defold/extension-resource-encryption/archive/refs/heads/master.zip'
]
failed_tests = []
def test_project(project):
print("Testing project:", project, os.environ['BUILD_SERVER'], os.environ['PLATFORMS'])
env = dict(os.environ)
env['PROJECTS'] = project
env['HANDLE_ERRORS'] = 'false'
print("-----------------------------------------------------------------------")
try:
p = subprocess.Popen(["./run-tests.sh"], env=env)
p.wait()
print("Task finished with return code:", p.returncode)
if p.returncode:
failed_tests.append((project, os.environ['PLATFORMS']))
except Exception as e:
print(traceback.format_exc())
print("Task finished with an exception")
failed_tests.append((project, os.environ['PLATFORMS']))
if __name__ == '__main__':
if 'PROJECTS' in os.environ:
PROJECTS =os.environ['PROJECTS'].split(',')
for project in PROJECTS:
test_project(project)
print("-----------------------------------------------------------------------")
if failed_tests:
print("Failed projects:")
for project, platforms in failed_tests:
print("\t", project, platforms)
sys.exit(1)
print("All projects passed")
sys.exit(0)