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

Unified Diff: mojo/tools/test_runner.py

Issue 780563002: Update unit test file format. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 years 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/get_test_list.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 27fe1fa8b20a28619e91f29d580934a7cd0390cf..c5a7ed8c72d2b9362c18d34179045770a27c2a3b 100755
--- a/mojo/tools/test_runner.py
+++ b/mojo/tools/test_runner.py
@@ -42,8 +42,7 @@ def main():
_logging.debug("Test list file: %s", args.gtest_list_file)
with open(args.gtest_list_file, 'rb') as f:
- gtest_list = [y for y in [x.strip() for x in f.readlines()] \
- if y and y[0] != '#']
+ gtest_list = eval(f.read())
_logging.debug("Test list: %s" % gtest_list)
print "Running tests in directory: %s" % args.root_dir
@@ -78,13 +77,16 @@ def main():
# TODO(vtl): We may not close this file on failure.
successes_cache_file = open(args.successes_cache_filename, 'ab') \
if args.successes_cache_filename else None
- for gtest in gtest_list:
- if gtest[0] == '*':
- gtest = gtest[1:]
+ for gtest_dict in gtest_list:
+ if gtest_dict.get("disabled"):
+ continue
+ if args.android and not gtest_dict.get("run_on_android"):
+ continue
+
+ gtest = gtest_dict["test"]
+ cacheable = gtest_dict.get("cacheable", True)
+ if not cacheable:
_logging.debug("%s is marked as non-cacheable" % gtest)
- cacheable = False
- else:
- cacheable = True
gtest_file = gtest
if platform.system() == 'Windows':
« no previous file with comments | « mojo/tools/get_test_list.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698