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

Unified Diff: mojo/tools/apptest_runner.py

Issue 888043002: Use a python script to configure unit tests and app tests to run. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 10 months 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 | « no previous file | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/apptest_runner.py
diff --git a/mojo/tools/apptest_runner.py b/mojo/tools/apptest_runner.py
index aa3b4e44e41fa9f33ce77e586a68d90e806c824a..7d484cf0d4ccdafca0a19789b6a0733c0d80deec 100755
--- a/mojo/tools/apptest_runner.py
+++ b/mojo/tools/apptest_runner.py
@@ -34,10 +34,15 @@ def main():
help='The build output directory.')
args = parser.parse_args()
- apptest_list = ast.literal_eval(args.apptest_list_file.read())
+ config = ConfigForGNArgs(ParseGNConfig(args.build_dir))
+
+ execution_globals = {
+ "config": config,
+ }
+ exec args.apptest_list_file in execution_globals
+ apptest_list = execution_globals["tests"]
_logging.debug("Test list: %s" % apptest_list)
- config = ConfigForGNArgs(ParseGNConfig(args.build_dir))
is_android = (config.target_os == Config.OS_ANDROID)
android_context = android.PrepareShellRun(config) if is_android else None
@@ -46,11 +51,6 @@ def main():
exit_code = 0
for apptest_dict in apptest_list:
- if apptest_dict.get("disabled"):
- continue
- if not config.match_target_os(apptest_dict.get("target_os", [])):
- continue
-
apptest = apptest_dict["test"]
apptest_args = apptest_dict.get("test-args", [])
shell_args = apptest_dict.get("shell-args", [])
« no previous file with comments | « no previous file | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698