Create simple suppressions file in PDFium repository.
authorTom Sepez <tsepez@chromium.org>
Mon, 23 Mar 2015 19:27:20 +0000 (12:27 -0700)
committerTom Sepez <tsepez@chromium.org>
Mon, 23 Mar 2015 19:27:20 +0000 (12:27 -0700)
This is needed to green the tree without continually reverting the
pdfium_tests (corpus) repository.

We will need to make this more sophisticated at some point, but for
now, let's try to green the buildbot.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1016613004

testing/SUPPRESSIONS [new file with mode: 0644]
testing/tools/run_corpus_tests.py

diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
new file mode 100644 (file)
index 0000000..2fce4e4
--- /dev/null
@@ -0,0 +1,46 @@
+1_10_watermark.pdf
+1_1_textbox.pdf
+1_2_typewriter.pdf
+1_3_callout.pdf
+2_6_textbox.pdf
+3_4_textbox.pdf
+5.2.pdf
+action.pdf
+all_trigger_alert.pdf
+all_trigger_browsefordoc.pdf
+all_trigger_mailmsg.pdf
+all_trigger_newdoc.pdf
+all_trigger_print.pdf
+bookmark.pdf
+calcorderindex_test.pdf
+calculate_order.pdf
+ch_1.pdf
+check_box.pdf
+combo_box.pdf
+fillform.pdf
+form_action_trigger.pdf
+format_custom_format.pdf
+format_custom_keystroke.pdf
+form_button_sign_url.pdf
+form_combobox0.pdf
+form_combobox_actioin_goto.pdf
+form_combobox_date1.pdf
+form_combobox_importform.pdf
+form_combobox_resetform.pdf
+form_combo_sign_url.pdf
+formfeild.pdf
+form_list1.pdf
+form_list.pdf
+form_text_sign_url.pdf
+javascriptaction.pdf
+js_calculate.pdf
+list_box.pdf
+number.pdf
+push_button.pdf
+radio_button.pdf
+run_custom_validate_script.pdf
+signature_4.pdf
+signature.pdf
+test_app_beep.pdf
+test_control.pdf
+text_field.pdf
index 3cfc3e7..d56cb1c 100755 (executable)
@@ -86,6 +86,9 @@ def main():
   if not os.path.exists(working_dir):
     os.makedirs(working_dir)
 
+  with open(os.path.join(testing_dir, 'SUPPRESSIONS')) as f:
+    suppression_list = [x.strip() for x in f.readlines()]
+
   # test files are under .../pdfium/testing/corpus.
   failures = []
   walk_from_dir = os.path.join(testing_dir, 'corpus');
@@ -95,7 +98,10 @@ def main():
       if input_file_re.match(input_filename):
          input_path = os.path.join(source_dir, input_filename)
          if os.path.isfile(input_path):
-           if not test_one_file(input_filename, source_dir, working_dir,
+           if input_filename in suppression_list:
+             print "Not running %s, found in SUPPRESSIONS file" % input_filename
+             continue
+         if not test_one_file(input_filename, source_dir, working_dir,
                                 pdfium_test_path, pdfium_diff_path):
              failures.append(input_path)