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

Unified Diff: tools/testrunner/local/statusfile.py

Issue 2610353002: [test] Presumbit check against missing tests in status files (Closed)
Patch Set: Generalize to all JS tests Created 3 years, 11 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 | « test/test262/test262.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/statusfile.py
diff --git a/tools/testrunner/local/statusfile.py b/tools/testrunner/local/statusfile.py
index 091754043bc048844d9ee95cdc9d09a36b0db337..b03fcc121e4fe9f86053968c5a7554e380c682b3 100644
--- a/tools/testrunner/local/statusfile.py
+++ b/tools/testrunner/local/statusfile.py
@@ -232,11 +232,22 @@ def _ReadSection(section, rules, wildcards, variables):
else:
_ParseOutcomeList(rule, section[rule], rules, variables)
+JS_TEST_PATHS = {
+ 'debugger': [[]],
+ 'inspector': [[]],
+ 'intl': [[]],
+ 'message': [[]],
+ 'mjsunit': [[]],
+ 'mozilla': [['data']],
+ 'test262': [['data', 'test'], ['local-tests', 'test']],
+ 'webkit': [[]],
+}
def PresubmitCheck(path):
with open(path) as f:
contents = ReadContent(f.read())
- root_prefix = os.path.basename(os.path.dirname(path)) + "/"
+ basename = os.path.basename(os.path.dirname(path))
+ root_prefix = basename + "/"
status = {"success": True}
def _assert(check, message): # Like "assert", but doesn't throw.
if not check:
@@ -255,6 +266,11 @@ def PresubmitCheck(path):
"Suite name prefix must not be used in rule keys")
_assert(not rule.endswith('.js'),
".js extension must not be used in rule keys.")
+ if basename in JS_TEST_PATHS and '*' not in rule:
+ _assert(any(os.path.exists(os.path.join(os.path.dirname(path),
+ *(paths + [rule + ".js"])))
+ for paths in JS_TEST_PATHS[basename]),
+ "missing file for %s test %s" % (basename, rule))
return status["success"]
except Exception as e:
print e
« no previous file with comments | « test/test262/test262.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698