| Index: googletest/isolate_test_cases.py
|
| diff --git a/isolate_test_cases.py b/googletest/isolate_test_cases.py
|
| similarity index 93%
|
| rename from isolate_test_cases.py
|
| rename to googletest/isolate_test_cases.py
|
| index 879d7d2afecb7d3e4afae5fd9bbee76d1855ecc6..b6639e9be98d46cd3e9a03123f20a4a9e55e138e 100755
|
| --- a/isolate_test_cases.py
|
| +++ b/googletest/isolate_test_cases.py
|
| @@ -17,13 +17,16 @@ import os
|
| import subprocess
|
| import sys
|
|
|
| +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)
|
| +
|
| import isolate
|
| +import run_isolated
|
| import run_test_cases
|
| import trace_inputs
|
| import trace_test_cases
|
|
|
| -BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| -
|
|
|
| def isolate_test_cases(
|
| cmd, test_cases, jobs, isolated_file, isolate_file,
|
| @@ -73,7 +76,7 @@ def isolate_test_cases(
|
| # importing the module instead if necessary.
|
| merge_cmd = [
|
| sys.executable,
|
| - os.path.join(BASE_DIR, 'isolate_merge.py'),
|
| + os.path.join(ROOT_DIR, 'isolate_merge.py'),
|
| isolate_file,
|
| '-o', isolate_file,
|
| ]
|
| @@ -103,7 +106,7 @@ def test_xvfb(command, rel_dir):
|
| prefix = command[index:index+2]
|
| prefix[0] = os.path.normpath(os.path.join(rel_dir, prefix[0]))
|
| prefix[1] = os.path.normpath(os.path.join(rel_dir, prefix[1]))
|
| - cmd = run_test_cases.fix_python_path(prefix + sys.argv)
|
| + cmd = run_isolated.fix_python_path(prefix + sys.argv)
|
| sys.exit(subprocess.call(cmd))
|
|
|
|
|
| @@ -120,7 +123,7 @@ def safely_load_isolated(parser, options):
|
| command = config.saved_state.command
|
| test_cases = []
|
| if command:
|
| - command = run_test_cases.fix_python_path(command)
|
| + command = run_isolated.fix_python_path(command)
|
| test_xvfb(command, reldir)
|
| test_cases = parser.process_gtest_options(command, reldir, options)
|
| return config, command, test_cases
|
| @@ -128,7 +131,7 @@ def safely_load_isolated(parser, options):
|
|
|
| def main():
|
| """CLI frontend to validate arguments."""
|
| - run_test_cases.run_isolated.disable_buffering()
|
| + run_isolated.disable_buffering()
|
| parser = run_test_cases.OptionParserTestCases(
|
| usage='%prog <options> --isolated <.isolated>')
|
| parser.format_description = lambda *_: parser.description
|
|
|