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

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

Issue 2308283002: Allow seeding the random layout test order and write out seed. (Closed)
Patch Set: Add random order seed to results file. Created 4 years, 3 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
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 aee2f8c32a3a4ee95a71472c0352427a1f6d641f..33d50b5a2877545f2d96c15b11a984bec665f24f 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
@@ -352,11 +352,21 @@ class RunTest(unittest.TestCase, StreamTestingMixin):
tests_run = get_tests_run(['--order=random'] + tests_to_run)
self.assertEqual(sorted(tests_to_run), sorted(tests_run))
- def test_random_daily_seed_order(self):
- tests_to_run = ['passes/audio.html', 'failures/expected/text.html',
- 'failures/expected/missing_text.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=random-seeded'] + tests_to_run)
- self.assertEqual(sorted(tests_to_run), sorted(tests_run))
+ def test_random_order_with_seed(self):
+ tests_to_run = [
+ 'failures/expected/missing_text.html',
+ 'failures/expected/text.html',
+ 'passes/args.html',
+ 'passes/audio.html',
+ ]
+ tests_run = get_tests_run(['--order=random', '--seed=5'] + sorted(tests_to_run))
+ expected_order = [
+ 'failures/expected/missing_text.html',
+ 'failures/expected/text.html',
+ 'passes/audio.html',
+ 'passes/args.html',
+ ]
+ self.assertEqual(tests_run, expected_order)
def test_random_order_test_specified_multiple_times(self):
tests_to_run = ['passes/args.html', 'passes/audio.html', 'passes/audio.html', 'passes/args.html']

Powered by Google App Engine
This is Rietveld 408576698