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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

Issue 2453513002: Change default behavior of --seed to be unix timestamp (Closed)
Patch Set: Address CL feedback from dpranke Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 7265f9dd3ef9f6d5082c847aa50413c6282c2c02..7956f1d3bbf6089a8c14fa37ef9d06236a65a957 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -365,6 +365,21 @@ class RunTest(unittest.TestCase, StreamTestingMixin):
]
self.assertEqual(tests_run, expected_order)
+ def test_random_order_with_timestamp_seed(self):
+ tests_to_run = sorted([
+ 'failures/expected/missing_text.html',
+ 'failures/expected/text.html',
+ 'passes/args.html',
+ 'passes/audio.html',
+ ])
+
+ run_1 = get_tests_run(['--order=random'] + tests_to_run, host=MockHost(time_return_val=10))
+ run_2 = get_tests_run(['--order=random'] + tests_to_run, host=MockHost(time_return_val=10))
+ self.assertEqual(run_1, run_2)
+
+ run_3 = get_tests_run(['--order=random'] + tests_to_run, host=MockHost(time_return_val=20))
+ self.assertNotEqual(run_1, run_3)
+
def test_random_order_test_specified_multiple_times(self):
tests_to_run = ['passes/args.html', 'passes/audio.html', 'passes/audio.html', 'passes/args.html']
tests_run = get_tests_run(['--order=random'] + tests_to_run)
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698