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

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

Issue 2385043002: In run_webkit_tests, use host.environ to access gtest shard env vars. (Closed)
Patch Set: 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 2d79e639577904c9d8911cb85907985e0286e130..ffd6dd796fa944703dc79a9328108b3b474cccee 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -30,7 +30,6 @@
import logging
import optparse
-import os
import sys
import traceback
@@ -543,9 +542,9 @@ def _set_up_derived_options(port, options, args):
if not options.skipped:
options.skipped = 'default'
- if 'GTEST_SHARD_INDEX' in os.environ and 'GTEST_TOTAL_SHARDS' in os.environ:
- shard_index = int(os.environ['GTEST_SHARD_INDEX']) + 1
- total_shards = int(os.environ['GTEST_TOTAL_SHARDS']) + 1
+ if 'GTEST_SHARD_INDEX' in port.host.environ and 'GTEST_TOTAL_SHARDS' in port.host.environ:
+ shard_index = int(port.host.environ['GTEST_SHARD_INDEX']) + 1
+ total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) + 1
options.run_part = '{0}:{1}'.format(shard_index, total_shards)

Powered by Google App Engine
This is Rietveld 408576698