Summary: | run-api-tests runs tests in a semi-random order | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> | ||||
Component: | Tools / Tests | Assignee: | Adam Roben (:aroben) <aroben> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ddkilzer, dslomov, sam | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Adam Roben (:aroben)
2011-08-17 13:06:43 PDT
Created attachment 104217 [details]
Patch
Comment on attachment 104217 [details]
Patch
r=me
Comment on attachment 104217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104217&action=review > Tools/Scripts/run-api-tests:109 > + for my $suite (sort keys %testsToRun) { Is it possible to sort testsToRun once and for all instead of sorting the result of keys everytime? (I do not know Perl well enough to answer...) Comment on attachment 104217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104217&action=review >> Tools/Scripts/run-api-tests:109 >> + for my $suite (sort keys %testsToRun) { > > Is it possible to sort testsToRun once and for all instead of sorting the result of keys everytime? (I do not know Perl well enough to answer...) sort will only run once in this function. Comment on attachment 104217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104217&action=review >>> Tools/Scripts/run-api-tests:109 >>> + for my $suite (sort keys %testsToRun) { >> >> Is it possible to sort testsToRun once and for all instead of sorting the result of keys everytime? (I do not know Perl well enough to answer...) > > sort will only run once in this function. Sorry I wasn't clear - I meant "populate testsToRun in such a way that all the iterations (both in this function and in runAllTestsInSuite) run in predictable order" (in case somebody adds some other iteration on tests somewhere and forgets to sort). Comment on attachment 104217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104217&action=review >>>> Tools/Scripts/run-api-tests:109 >>>> + for my $suite (sort keys %testsToRun) { >>> >>> Is it possible to sort testsToRun once and for all instead of sorting the result of keys everytime? (I do not know Perl well enough to answer...) >> >> sort will only run once in this function. > > Sorry I wasn't clear - I meant "populate testsToRun in such a way that all the iterations (both in this function and in runAllTestsInSuite) run in predictable order" (in case somebody adds some other iteration on tests somewhere and forgets to sort). I see. I don't know whether it's possible to sort %testsToRun itself, since it's a hash. We could keep around sorted arrays of suites and test names, but that would just be duplicating data that's already in %testsToRun. Committed r93240: <http://trac.webkit.org/changeset/93240> |