Merge to XFA: Allow running individual tests.
authorDan Sinclair <dsinclair@chromium.org>
Wed, 28 Oct 2015 21:12:33 +0000 (17:12 -0400)
committerDan Sinclair <dsinclair@chromium.org>
Wed, 28 Oct 2015 21:12:33 +0000 (17:12 -0400)
commit456b923e60071b10c5cd9a2a907f7c190d548942
treeb0d4bc368e419334f93c0c9f3157002c60705b11
parentb85544053495270bb54b55c79124f5318737fc8b
Merge to XFA: Allow running individual tests.

This CL adds the ability to run a given test from the corpus, javascript and
pixel test runners. The filename to provide is relative to the testing
directory in question.

Because the directories for javascript and pixel are flat you just provide the filename (it will rewrite the .pdf to .in if .pdf is provided). For corpus tests you have to provide the path from the corpus directory.

Development/pdfium/pdfium % ./testing/tools/run_javascript_tests.py apply.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/javascript/apply.pdf.
Non-linearized path...
Rendered 1 pages.
Skipped 0 bad pages.

Development/pdfium/pdfium % ./testing/tools/run_pixel_tests.py bug_524043_1.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/pixel/bug_524043_1.pdf.
Linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Checking /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/pixel/bug_524043_1.pdf.0.png
diff: 0.00% passed

Development/pdfium/pdfium % ./testing/tools/run_corpus_tests.py third_party/tcpdf/example_065.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.
Non-linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Checking /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.0.png
diff: 0.14% failed
FAILURE: example_065.pdf; Command '['/Development/pdfium/pdfium/out/Debug/pdfium_diff', '/Development/pdfium/pdfium/testing/corpus/third_party/tcpdf/example_065_expected.pdf.0.png', '/Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.0.png']' returned non-zero exit status 1

Summary of Failures:
/Development/pdfium/pdfium/testing/corpus/third_party/tcpdf/example_065.pdf

TBR=thestig@chromium.org

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

(cherry picked from commit da6254ff78553773b7bb637ee1e3f5111c083c74)

Review URL: https://codereview.chromium.org/1423523005 .
testing/tools/run_corpus_tests.py
testing/tools/run_javascript_tests.py
testing/tools/run_pixel_tests.py