Support comments and blank lines in SUPPRESSIONS file
authorTom Sepez <tsepez@chromium.org>
Mon, 23 Mar 2015 21:24:13 +0000 (14:24 -0700)
committerTom Sepez <tsepez@chromium.org>
Mon, 23 Mar 2015 21:24:13 +0000 (14:24 -0700)
The comment character is #.

R=thestig@chromium.org

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

testing/tools/run_corpus_tests.py

index d56cb1c..05be76e 100755 (executable)
@@ -87,7 +87,8 @@ def main():
     os.makedirs(working_dir)
 
   with open(os.path.join(testing_dir, 'SUPPRESSIONS')) as f:
-    suppression_list = [x.strip() for x in f.readlines()]
+    suppression_list = [y for y in [
+      x.split('#')[0].strip() for x in f.readlines()] if y]
 
   # test files are under .../pdfium/testing/corpus.
   failures = []