mojob.py: add nacltest command.
Currently this command runs the Mojo interface unit tests inside the NaCl
sandbox.
BUG=https://code.google.com/p/chromium/issues/detail?id=401761
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/825063003
diff --git a/mojo/tools/get_test_list.py b/mojo/tools/get_test_list.py
index 4b6a3cc..d8810ae 100755
--- a/mojo/tools/get_test_list.py
+++ b/mojo/tools/get_test_list.py
@@ -154,6 +154,15 @@
os.path.join("mojo", "tools", "data", "dart_unittests"),
build_dir, "mojob_test_successes"])
+ # NaCl tests:
+ if ShouldRunTest("nacl"):
+ AddEntry("NaCl tests",
+ [os.path.join(build_dir, "monacl_shell"),
+ os.path.join(build_dir, "irt_" + config.target_arch,
+ "irt_core.nexe"),
+ os.path.join(build_dir, "clang_newlib_" + config.target_arch,
+ "monacl_test.nexe")])
+
# ----------------------------------------------------------------------------
return test_list
diff --git a/mojo/tools/mojob.py b/mojo/tools/mojob.py
index 5bb57ed..3461ec4 100755
--- a/mojo/tools/mojob.py
+++ b/mojo/tools/mojob.py
@@ -195,6 +195,10 @@
return _run_tests(config, ['dart'])
+def nacltest(config):
+ return _run_tests(config, ['nacl'])
+
+
def main():
os.chdir(Paths().src_root)
@@ -283,6 +287,10 @@
help='Run Dart unit tests (does not build).')
darttest_parser.set_defaults(func=darttest)
+ nacltest_parser = subparsers.add_parser('nacltest', parents=[parent_parser],
+ help='Run NaCl unit tests (does not build).')
+ nacltest_parser.set_defaults(func=nacltest)
+
args = parser.parse_args()
config = _args_to_config(args)
return args.func(config)