Index: mojo/tools/apptest_runner.py |
diff --git a/mojo/tools/apptest_runner.py b/mojo/tools/apptest_runner.py |
index f2b459b980476f71a9651fb52b9cc609b3614d20..0990fc254c32d44c0b97e5ae01fbe5149f5fd68d 100755 |
--- a/mojo/tools/apptest_runner.py |
+++ b/mojo/tools/apptest_runner.py |
@@ -13,6 +13,7 @@ import sys |
_logging = logging.getLogger() |
from mopy import android |
+from mopy import dart_apptest |
from mopy import gtest |
from mopy.background_app_group import BackgroundAppGroup |
from mopy.config import Config |
@@ -62,33 +63,41 @@ def main(): |
print "Running " + apptest + "...", |
sys.stdout.flush() |
- # List the apptest fixtures so they can be run independently for isolation. |
- # TODO(msw): Run some apptests without fixture isolation? |
- fixtures = gtest.get_fixtures(config, shell_args, apptest) |
- |
- if not fixtures: |
- print "Failed with no tests found." |
- exit_code = 1 |
- continue |
- |
- if any(not mojo_paths.IsValidAppUrl(url) for url in launched_services): |
- print "Failed with malformed launched-services: %r" % launched_services |
- exit_code = 1 |
- continue |
- |
- apptest_result = "Succeeded" |
- for fixture in fixtures: |
- apptest_args = test_args + ["--gtest_filter=%s" % fixture] |
- if launched_services: |
- success = RunApptestInLauncher(config, mojo_paths, apptest, |
- apptest_args, shell_args, |
- launched_services) |
- else: |
- success = RunApptestInShell(config, apptest, apptest_args, shell_args) |
- |
+ if apptest_dict.get("darttest", False): |
+ # TODO(erg): Support android and external and fixture isolation. |
msw
2015/03/04 00:49:50
Should fixture isolation (via separate shell invoc
Elliot Glaysher
2015/03/04 20:17:02
I am going to punt on this for now.
msw
2015/03/04 21:04:31
shrug, okay.
|
+ apptest_result = "Succeeded" |
+ success = dart_apptest.run_test(config, shell_args, {apptest: test_args}) |
if not success: |
apptest_result = "Failed test(s) in %r" % apptest_dict |
exit_code = 1 |
+ else: |
+ # List the apptest fixtures so they can be run independently for |
+ # isolation. TODO(msw): Run some apptests without fixture isolation? |
+ fixtures = gtest.get_fixtures(config, shell_args, apptest) |
+ |
+ if not fixtures: |
+ print "Failed with no tests found." |
+ exit_code = 1 |
+ continue |
+ |
+ if any(not mojo_paths.IsValidAppUrl(url) for url in launched_services): |
+ print "Failed with malformed launched-services: %r" % launched_services |
+ exit_code = 1 |
+ continue |
+ |
+ apptest_result = "Succeeded" |
+ for fixture in fixtures: |
+ apptest_args = test_args + ["--gtest_filter=%s" % fixture] |
+ if launched_services: |
+ success = RunApptestInLauncher(config, mojo_paths, apptest, |
+ apptest_args, shell_args, |
+ launched_services) |
+ else: |
+ success = RunApptestInShell(config, apptest, apptest_args, shell_args) |
+ |
+ if not success: |
+ apptest_result = "Failed test(s) in %r" % apptest_dict |
+ exit_code = 1 |
print apptest_result |