Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Unified Diff: mojo/tools/mojob.py

Issue 728783003: Add infrastructure to run tests on android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/tools/mojob.py
diff --git a/mojo/tools/mojob.py b/mojo/tools/mojob.py
index 5170b853882086ed57e6010c64bf5ad66bdfd2b0..f152432e8da5c5d6e50760431a6c9b70e81da5e1 100755
--- a/mojo/tools/mojob.py
+++ b/mojo/tools/mojob.py
@@ -107,12 +107,17 @@ def run_unittests(args):
out_dir = get_out_dir(args)
print 'Running unit tests in %s ...' % out_dir
command = ['python']
- if platform.system() == 'Linux':
+ if platform.system() == 'Linux' and not args.android:
command.append('./testing/xvfb.py')
command.append(out_dir)
command.append(os.path.join('mojo', 'tools', 'test_runner.py'))
- command.append(os.path.join('mojo', 'tools', 'data', 'unittests'))
+ command.append('--debug' if args.debug else '--release')
+ if args.android:
+ command.append('--android')
+ command.append(os.path.join('mojo', 'tools', 'data', 'android_unittests'))
+ else:
+ command.append(os.path.join('mojo', 'tools', 'data', 'unittests'))
command.append(out_dir)
command.append('mojob_test_successes')
return subprocess.call(command)
@@ -120,7 +125,7 @@ def run_unittests(args):
def run_skytests(args):
out_dir = get_out_dir(args)
- if platform.system() != 'Linux':
+ if platform.system() != 'Linux' or args.android:
return 0
command = []
@@ -144,7 +149,7 @@ def run_pytests(args):
if exit_code:
return exit_code
- if platform.system() != 'Linux':
+ if platform.system() != 'Linux' or args.android:
print ('Python bindings tests are only supported on Linux.')
return

Powered by Google App Engine
This is Rietveld 408576698