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

Unified Diff: testing/tools/run_javascript_tests.py

Issue 1014083003: Return OS status code from python test driver scripts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Indent. Created 5 years, 9 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 | « testing/tools/run_corpus_tests.py ('k') | testing/tools/run_pixel_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/tools/run_javascript_tests.py
diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py
index 4361ea08f983009d630a0569f5bc37fe8372264f..ddc82665d56289558cdf8cde1d0996984444176c 100755
--- a/testing/tools/run_javascript_tests.py
+++ b/testing/tools/run_javascript_tests.py
@@ -30,6 +30,8 @@ def generate_and_test(input_filename, source_dir, working_dir,
subprocess.check_call(['diff', expected_path, txt_path])
except subprocess.CalledProcessError as e:
print "FAILURE: " + input_filename + "; " + str(e)
+ return False
+ return True
def main():
parser = optparse.OptionParser()
@@ -78,14 +80,17 @@ def main():
if not os.path.exists(working_dir):
os.makedirs(working_dir)
+ os_exit_code = 0
input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]in$')
for input_filename in os.listdir(source_dir):
if input_file_re.match(input_filename):
input_path = os.path.join(source_dir, input_filename)
if os.path.isfile(input_path):
- generate_and_test(input_filename, source_dir, working_dir,
- fixup_path, pdfium_test_path)
- return 0
+ if not generate_and_test(input_filename, source_dir, working_dir,
+ fixup_path, pdfium_test_path):
+ os_exit_code = 1
+
+ return os_exit_code
if __name__ == '__main__':
« no previous file with comments | « testing/tools/run_corpus_tests.py ('k') | testing/tools/run_pixel_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698