-
Notifications
You must be signed in to change notification settings - Fork 34
/
test-builds.py
33 lines (25 loc) · 801 Bytes
/
test-builds.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
import glob
from subprocess import call
test_failures = {}
test_successes = {}
files = [file for file in glob.glob('../**/build.gradle', recursive=True)]
for f in files:
if f.startswith('../test'):
continue
# clean all projects in the platform before executing build
print("Cleaning all projects first...")
call(['../gradlew', '-p', '../', 'clean'])
print("Executing " + f + "...")
rc = call(['../gradlew', '-b', f, 'build', 'clean'])
if rc == 0:
test_successes[f] = rc
else:
test_failures[f] = rc
print("Return code: " + str(rc))
print("FAILURES:")
for key in test_failures:
print(key + ": " + "FAILED(rc=" + str(test_failures[key]) + ")!")
print("\n\n")
print("SUCCESSES:")
for key in test_successes:
print(key + ": PASS")