| 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__':
|
|
|