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

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: 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 03d259f9282be9a3e599c0f427aa83ff6fea185c..87ee52b866c480dd3c8ce7b2406e4498fc2450f8 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