Skip to content

Modernize the test driver #14344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 5, 2021
Merged

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Dec 4, 2021

The commit messages contain more information about the individual changes. The ?w=1 flag is most likely necessary for reviewing most commits.

Initially I only tried to enable the no-var linting rule since our testing code is one of the final places where we exclude that rule, but I quickly found that the driver code could use further modernization. Hence this commit series, where each commit contains a separate refactoring step. Note that there is most likely more opportunity for improvement here, for instance using template strings more often and getting rid of XHR, but I deliberately left that for a follow-up since this series is already quite a big.

This PR makes the driver code 103 lines shorter and, in my opinion at least, easier to understand and work with.

@timvandermeij
Copy link
Contributor Author

/botio test

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really nice that you're doing this, but before I review it in detail there's one thing I fear is incorrect; please see the inline comment.

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Dec 4, 2021

and getting rid of XHR,

Just a word of warning: I actually tried that recently, but abandoned it for the time being since I ran into some trouble; please see #14287 (comment)

…r.js`

The wrapper functions in this case only really added indirection, so
this commit simplifies the code a bit.
This is achieved by letting the `writeSVG` function return a promise so
we don't need callback passing anymore.
@mozilla mozilla deleted a comment from pdfjsbot Dec 5, 2021
@mozilla mozilla deleted a comment from pdfjsbot Dec 5, 2021
@mozilla mozilla deleted a comment from pdfjsbot Dec 5, 2021
@mozilla mozilla deleted a comment from pdfjsbot Dec 5, 2021
This is done automatically with the `gulp lint --fix` command with the
only exception of the `annotationLayerContext` variable.
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with one final comment addressed (everywhere that it applies); thanks a lot for doing this!

I'd suggest running the tests maybe a couple of times, to ensure that there's no new intermittent failures (since the usage of async perhaps affect timings ever so slightly).

This refactoring ensures that we can get rid of the closures and
encapsulate the logic in a nicer way with e.g., getters for the style
promises.
Now that the rasterization logic is encapsulated in a class, we can
easily move the container creation into a separate static method.
@timvandermeij
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/d257169e1370e0e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/3c60319b743fe02/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/d257169e1370e0e/output.txt

Total script time: 21.19 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 7
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/d257169e1370e0e/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/3c60319b743fe02/output.txt

Total script time: 42.02 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 5
  different first/second rendering: 1

Image differences available at: http://54.193.163.58:8877/3c60319b743fe02/reftest-analyzer.html#web=eq.log

@Snuffleupagus
Copy link
Collaborator

/botio browsertest

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/b9f9d44263dadc4/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/635bfee40cd6d1e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/635bfee40cd6d1e/output.txt

Total script time: 19.48 mins

  • Regression tests: FAILED
  different ref/snapshot: 8
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/635bfee40cd6d1e/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/b9f9d44263dadc4/output.txt

Total script time: 37.67 mins

  • Regression tests: FAILED
  different ref/snapshot: 7
  different first/second rendering: 1

Image differences available at: http://54.193.163.58:8877/b9f9d44263dadc4/reftest-analyzer.html#web=eq.log

@Snuffleupagus
Copy link
Collaborator

/botio browsertest

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/d10b48e2ae41db2/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/3e138dd76ba1f10/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/d10b48e2ae41db2/output.txt

Total script time: 19.49 mins

  • Regression tests: FAILED
  different ref/snapshot: 9
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/d10b48e2ae41db2/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2021

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/3e138dd76ba1f10/output.txt

Total script time: 37.34 mins

  • Regression tests: FAILED
  different ref/snapshot: 5
  different first/second rendering: 1

Image differences available at: http://54.193.163.58:8877/3e138dd76ba1f10/reftest-analyzer.html#web=eq.log

@Snuffleupagus Snuffleupagus merged commit 034b870 into mozilla:master Dec 5, 2021
@timvandermeij timvandermeij deleted the test-driver branch December 8, 2021 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants