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

Unified Diff: mojo/tools/test_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 | « mojo/tools/mopy/config.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/test_runner.py
diff --git a/mojo/tools/test_runner.py b/mojo/tools/test_runner.py
index 5e3e3b87b07e044a6df616174287cfe7688733fd..16a855b9f502f8ef7af2e08d8e791d3e3ee6d2ad 100755
--- a/mojo/tools/test_runner.py
+++ b/mojo/tools/test_runner.py
@@ -41,12 +41,16 @@ def main():
nargs='?')
args = parser.parse_args()
+ config = ConfigForGNArgs(ParseGNConfig(args.root_dir))
+
_logging.debug("Test list file: %s", args.gtest_list_file)
- gtest_list = ast.literal_eval(args.gtest_list_file.read())
+ execution_globals = {
+ "config": config,
+ }
+ exec args.gtest_list_file in execution_globals
+ gtest_list = execution_globals["tests"]
_logging.debug("Test list: %s" % gtest_list)
- config = ConfigForGNArgs(ParseGNConfig(args.root_dir))
-
print "Running tests in directory: %s" % args.root_dir
os.chdir(args.root_dir)
@@ -76,11 +80,6 @@ def main():
successes_cache_file = open(args.successes_cache_filename, 'ab') \
if args.successes_cache_filename else None
for gtest_dict in gtest_list:
- if gtest_dict.get("disabled"):
- continue
- if not config.match_target_os(gtest_dict.get("target_os", [])):
- continue
-
gtest = gtest_dict["test"]
cacheable = gtest_dict.get("cacheable", True)
if not cacheable:
« no previous file with comments | « mojo/tools/mopy/config.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698