Skip to content
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

show list of errors on inconsistent tests #4998

Merged

Conversation

bobholt
Copy link
Contributor

@bobholt bobholt commented Feb 23, 2017

This is a re-implementation of #4916 with the changes requested in the review after that PR was closed.

@jgraham: I'm happy to continue the review here.

@w3c-bots
Copy link

w3c-bots commented Feb 23, 2017

View the complete job log.

Firefox (nightly channel)

Testing web-platform-tests at revision 9c19a1f2fd306c251512291c1bcf088c4d198e22
Using browser at version BuildID 20170223110219; SourceStamp 32dcdde1fc64fc39a9065dc4218265dbc727673f
Starting 10 test iterations

Unstable results

Test Subtest Results Messages
/url/historical.html URL.domainToASCII should be undefined FAIL: 6/10, PASS: 4/10 assert_equals: expected true but got false

All results

1 test ran
/url/historical.html
Subtest Results Messages
OK
searchParams on location object PASS
searchParams on a element PASS
searchParams on area element PASS
Setting URL's href attribute and base URLs PASS
URL.domainToASCII should be undefined FAIL: 6/10, PASS: 4/10 assert_equals: expected true but got false
URL.domainToUnicode should be undefined PASS

@w3c-bots
Copy link

w3c-bots commented Feb 23, 2017

View the complete job log.

Chrome (unstable channel)

Testing web-platform-tests at revision 9c19a1f2fd306c251512291c1bcf088c4d198e22
Using browser at version 58.0.3018.3 dev
Starting 10 test iterations

Unstable results

Test Subtest Results Messages
/url/historical.html URL.domainToASCII should be undefined FAIL: 4/10, PASS: 6/10 assert_equals: expected true but got false

All results

1 test ran
/url/historical.html
Subtest Results Messages
OK
searchParams on location object PASS
searchParams on a element PASS
searchParams on area element PASS
Setting URL's href attribute and base URLs FAIL assert_throws: function "function () {\n url.href = "./bar";\n }" did not throw
URL.domainToASCII should be undefined FAIL: 4/10, PASS: 6/10 assert_equals: expected true but got false
URL.domainToUnicode should be undefined PASS


def test_status(self, data):
self.results[data["test"]][data.get("subtest")][data["status"]] += 1
subtest = self.find_or_create_subtest(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm quite tempted to inline this since it should always exist and function calls are rather expensive. It probably doesn't matter though, so up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In editing this code yesterday, it was easier to understand and make the parallel changes to test and subtest functionality with it broken out, so I'd like to keep it as-is for maintainability.

for subtest, result in test_results.iteritems():
if is_inconsistent(result, iterations):
inconsistent.append((test, subtest, result))
for test_name, test in results.items():
Copy link
Contributor

Choose a reason for hiding this comment

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

Use iteritems here and below.

Also, since you moved the test status up into the test object rather than making it a "subtest" with no name, this check misses tests that have an unstable overall status. So you either need to revert that change or fix up here (and maybe elsewhere) that assumes the parent test is represented as a subtest with None as the name.

@@ -592,22 +628,24 @@ def write_results(results, iterations, comment_pr):
"tests" if len(results) > 1
else "test"))

for test, test_results in results.iteritems():
for test_name, test in results.items():
Copy link
Contributor

Choose a reason for hiding this comment

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

iteritems()

@wpt-pr-bot wpt-pr-bot added the url label Feb 24, 2017
@bobholt
Copy link
Contributor Author

bobholt commented Feb 24, 2017

@jgraham I believe I've addressed your comments. I added a fixup commit for easier review of the change and an unstable test to prove to myself it still worked. I'll squash after you take a look.

@wpt-pr-bot
Copy link
Collaborator

@annevk annevk removed the url label Feb 24, 2017
Copy link
Contributor

@jgraham jgraham left a comment

Choose a reason for hiding this comment

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

This looks OK to me now. Thanks for making the changes!

@bobholt
Copy link
Contributor Author

bobholt commented Feb 24, 2017

Thanks @jgraham. Just pushed a single commit.

For posterity, the current unstable output looks like:
raise_errors

@jgraham jgraham merged commit 82dd70b into web-platform-tests:master Feb 28, 2017
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.

None yet

5 participants