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

Unified Diff: tools/presubmit.py

Issue 290023002: Move check for existence of generated tests from run-tests.py to presubmit.py (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | tools/run-tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/presubmit.py
diff --git a/tools/presubmit.py b/tools/presubmit.py
index 7961156b7ae8b5a8f3b123efabcd4343079c3931..a4ca39980522fbdbfe40527b90cd825520ceec62 100755
--- a/tools/presubmit.py
+++ b/tools/presubmit.py
@@ -306,7 +306,8 @@ class SourceProcessor(SourceFileProcessor):
if self.IgnoreDir(dir_part):
break
else:
- if self.IsRelevant(file) and not self.IgnoreFile(file):
+ if (self.IsRelevant(file) and os.path.exists(file)
+ and not self.IgnoreFile(file)):
result.append(join(path, file))
if output.wait() == 0:
return result
@@ -416,6 +417,13 @@ class SourceProcessor(SourceFileProcessor):
return success
+def CheckGeneratedRuntimeTests(workspace):
+ code = subprocess.call(
+ [sys.executable, join(workspace, "tools", "generate-runtime-tests.py"),
+ "check"])
+ return code == 0
+
+
def GetOptions():
result = optparse.OptionParser()
result.add_option('--no-lint', help="Do not run cpplint", default=False,
@@ -434,6 +442,7 @@ def Main():
print "Running copyright header, trailing whitespaces and " \
"two empty lines between declarations check..."
success = SourceProcessor().Run(workspace) and success
+ success = CheckGeneratedRuntimeTests(workspace) and success
if success:
return 0
else:
« no previous file with comments | « no previous file | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698