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
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,
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:
workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), ".."))
if not options.no_presubmit:
print ">>> running presubmit tests"
- code = subprocess.call(
+ exit_code = subprocess.call(
[sys.executable, join(workspace, "tools", "presubmit.py")])
- exit_code = code
- code = subprocess.call(
- [sys.executable, join(workspace, "tools", "generate-runtime-tests.py"),
- "check"])
- exit_code = exit_code or code
suite_paths = utils.GetSuitePaths(join(workspace, "test"))