Add option to run tests without assertions enabled
This makes the tests run faster, and gives faster turnaround when testing
issues not related to asserts in the code.
R=ricow@google.com
Change-Id: Ic91f7e5ff3b21469c6cfc3d8f6cd00de75f3042b
diff --git a/tools/test.py b/tools/test.py
index 2f5baf8..270771b 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -47,6 +47,9 @@
result.add_option('--jctf_compile_only',
help="Don't run, only compile JCTF tests.",
default=False, action='store_true')
+ result.add_option('--disable_assertions',
+ help="Disable assertions when running tests.",
+ default=False, action='store_true')
return result.parse_args()
@@ -74,6 +77,8 @@
gradle_args.append('-Ponly_jctf')
if options.jctf_compile_only:
gradle_args.append('-Pjctf_compile_only')
+ if options.disable_assertions:
+ gradle_args.append('-Pdisable_assertions')
if len(args) > 0:
gradle_args.append('--tests')
gradle_args.append(args[0])
@@ -84,5 +89,3 @@
if __name__ == '__main__':
sys.exit(Main())
-
-