Make run-test build scripts more deterministic
Use soong_zip instead of system zip to make the build deterministic.
This is guaranteed to be same on all machines and removes timestamp.
Fix helper utility which generated java source code with functions
in random order for some tests.
There is still some non-determinism left caused by the smali
compiler generating non-deterministic dex output files.
Bug: 147814778
Test: test.py --host
Change-Id: Ibd1187e7cda840b647d3f13ad158952f235716bf
diff --git a/test/utils/python/generate_java_main.py b/test/utils/python/generate_java_main.py
index 1c76b06..5ee8cdb 100755
--- a/test/utils/python/generate_java_main.py
+++ b/test/utils/python/generate_java_main.py
@@ -100,7 +100,7 @@
main_func = self.MAIN_FUNCTION_TEMPLATE.format(test_group_invoke=test_invoke)
funcs = ""
- for f in self.global_funcs:
+ for f in sorted(self.global_funcs):
funcs += str(f)
return self.MAIN_CLASS_TEMPLATE.format(copyright = get_copyright('java'),
test_groups=test_groups,