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

Unified Diff: googletest/isolate_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/fix_test_cases.py ('k') | googletest/list_test_cases.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « googletest/fix_test_cases.py ('k') | googletest/list_test_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698