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

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: Follow review 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
« no previous file with comments | « mojo/tools/data/android_unittests ('k') | mojo/tools/mopy/file_hash.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mojob.py
diff --git a/mojo/tools/mojob.py b/mojo/tools/mojob.py
index ca244af1d5c73b5484c96385fdcda464538957fc..c5f4d163df4b9603e8edfccc406cbcb32d1fb38d 100755
--- a/mojo/tools/mojob.py
+++ b/mojo/tools/mojob.py
@@ -108,18 +108,25 @@ 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'))
+ 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)
def run_apptests(args):
out_dir = get_out_dir(args)
+ if args.android:
+ return 0
+
print 'Running application tests in %s ...' % out_dir
command = ['python']
if platform.system() == 'Linux':
@@ -133,7 +140,7 @@ def run_apptests(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 = []
@@ -177,7 +184,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
« no previous file with comments | « mojo/tools/data/android_unittests ('k') | mojo/tools/mopy/file_hash.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698