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

Issue 1407913005: Allow running individual tests. (Closed)

Created:
5 years, 1 month ago by dsinclair
Modified:
5 years, 1 month ago
Reviewers:
Lei Zhang, Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

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 R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/da6254ff78553773b7bb637ee1e3f5111c083c74

Patch Set 1 #

Total comments: 12

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -9 lines) Patch
M testing/tools/run_corpus_tests.py View 1 1 chunk +18 lines, -7 lines 0 comments Download
M testing/tools/run_javascript_tests.py View 1 2 chunks +9 lines, -1 line 0 comments Download
M testing/tools/run_pixel_tests.py View 1 1 chunk +8 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
dsinclair
PTAL. I wanted to be able to run individual tests without having to run the ...
5 years, 1 month ago (2015-10-28 19:39:02 UTC) #3
Tom Sepez
https://codereview.chromium.org/1407913005/diff/1/testing/tools/run_corpus_tests.py File testing/tools/run_corpus_tests.py (right): https://codereview.chromium.org/1407913005/diff/1/testing/tools/run_corpus_tests.py#newcode108 testing/tools/run_corpus_tests.py:108: if len(args) != 0: nit: can just write if ...
5 years, 1 month ago (2015-10-28 20:25:49 UTC) #4
dsinclair
https://codereview.chromium.org/1407913005/diff/1/testing/tools/run_corpus_tests.py File testing/tools/run_corpus_tests.py (right): https://codereview.chromium.org/1407913005/diff/1/testing/tools/run_corpus_tests.py#newcode108 testing/tools/run_corpus_tests.py:108: if len(args) != 0: On 2015/10/28 at 20:25:48, Tom ...
5 years, 1 month ago (2015-10-28 20:56:46 UTC) #5
Tom Sepez
Looks good but get Lei's (stronger python) opinion.
5 years, 1 month ago (2015-10-28 20:58:16 UTC) #6
Lei Zhang
lgtm I had started commenting, but noticed Tom was already finished.
5 years, 1 month ago (2015-10-28 21:02:41 UTC) #7
dsinclair
5 years, 1 month ago (2015-10-28 21:06:08 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
da6254ff78553773b7bb637ee1e3f5111c083c74 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698