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

Unified Diff: googletest/shard_test_cases.py

Issue 19917006: Move all googletest related scripts into googletest/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Remove unnecessary pylint warning disable Created 7 years, 5 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 | « googletest/run_test_cases.py ('k') | googletest/tests/fix_test_cases_smoke_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: googletest/shard_test_cases.py
diff --git a/shard_test_cases.py b/googletest/shard_test_cases.py
similarity index 78%
rename from shard_test_cases.py
rename to googletest/shard_test_cases.py
index bb6d574ea520782bcad7e152ed9ddb93d584fa43..b5277eded22b0f8828cc27a710a20c12d372a372 100755
--- a/shard_test_cases.py
+++ b/googletest/shard_test_cases.py
@@ -14,17 +14,11 @@ import os
import subprocess
import sys
-import run_isolated
-
+ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+if not ROOT_DIR in sys.path:
+ sys.path.insert(0, ROOT_DIR)
-def fix_python_path(cmd):
- """Returns the fixed command line to call the right python executable."""
- out = cmd[:]
- if out[0] == 'python':
- out[0] = sys.executable
- elif out[0].endswith('.py'):
- out.insert(0, sys.executable)
- return out
+import run_isolated
def main():
@@ -45,7 +39,7 @@ def main():
env = os.environ.copy()
env['GTEST_TOTAL_SHARDS'] = str(options.shards)
env['GTEST_SHARD_INDEX'] = str(options.index)
- return subprocess.call(fix_python_path(args), env=env)
+ return subprocess.call(run_isolated.fix_python_path(args), env=env)
if __name__ == '__main__':
« no previous file with comments | « googletest/run_test_cases.py ('k') | googletest/tests/fix_test_cases_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698