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

Unified Diff: googletest/tests/isolate_test_cases_smoke_test.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
Index: googletest/tests/isolate_test_cases_smoke_test.py
diff --git a/tests/isolate_test_cases_smoke_test.py b/googletest/tests/isolate_test_cases_smoke_test.py
similarity index 91%
rename from tests/isolate_test_cases_smoke_test.py
rename to googletest/tests/isolate_test_cases_smoke_test.py
index 8b437a5173904ff17a33e28d52bf17baf54e2de2..25bbea109efc6085d38bf393c27ee42727834362 100755
--- a/tests/isolate_test_cases_smoke_test.py
+++ b/googletest/tests/isolate_test_cases_smoke_test.py
@@ -14,8 +14,10 @@ import sys
import tempfile
import unittest
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-ROOT_DIR = os.path.dirname(BASE_DIR)
+GOOGLETEST_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ROOT_DIR = os.path.dirname(GOOGLETEST_DIR)
+
+sys.path.insert(0, GOOGLETEST_DIR)
sys.path.insert(0, ROOT_DIR)
import isolate
@@ -57,10 +59,10 @@ class IsolateTestCases(unittest.TestCase):
else:
shutil.rmtree(self.tempdir)
- def _copy(self, *relpath):
+ def _copy(self, root, *relpath):
relpath = os.path.join(*relpath)
shutil.copy(
- os.path.join(ROOT_DIR, relpath),
+ os.path.join(root, relpath),
os.path.join(self.tempdir, relpath))
def test_simple(self):
@@ -79,10 +81,10 @@ class IsolateTestCases(unittest.TestCase):
os.mkdir(os.path.join(self.tempdir, 'tests'))
os.mkdir(os.path.join(self.tempdir, 'tests', 'gtest_fake'))
os.mkdir(os.path.join(self.tempdir, 'tests', 'isolate_test_cases'))
- self._copy('isolate.py')
- self._copy(gtest_fake_base_py)
- self._copy(gtest_fake_pass_isolate)
- self._copy(gtest_fake_pass_py)
+ self._copy(ROOT_DIR, 'isolate.py')
+ self._copy(GOOGLETEST_DIR, gtest_fake_base_py)
+ self._copy(GOOGLETEST_DIR, gtest_fake_pass_isolate)
+ self._copy(GOOGLETEST_DIR, gtest_fake_pass_py)
basename = os.path.join(self.tempdir, 'isolated', 'gtest_fake_pass')
isolated = basename + '.isolated'
@@ -102,7 +104,8 @@ class IsolateTestCases(unittest.TestCase):
# Assert the content of the .isolated file.
with open(isolated) as f:
actual_isolated = json.load(f)
- root_dir_gtest_fake_pass_py = os.path.join(ROOT_DIR, gtest_fake_pass_py)
+ root_dir_gtest_fake_pass_py = os.path.join(
+ GOOGLETEST_DIR, gtest_fake_pass_py)
rel_gtest_fake_pass_py = os.path.join(u'gtest_fake', 'gtest_fake_pass.py')
expected_isolated = {
u'command': [u'../gtest_fake/gtest_fake_pass.py'],
@@ -123,7 +126,7 @@ class IsolateTestCases(unittest.TestCase):
cmd = [
sys.executable,
- os.path.join(ROOT_DIR, 'isolate_test_cases.py'),
+ os.path.join(GOOGLETEST_DIR, 'isolate_test_cases.py'),
# Forces 4 parallel jobs.
'--jobs', '4',
'--isolated', isolated,
« no previous file with comments | « googletest/tests/isolate_test_cases/gtest_fake_pass.isolate ('k') | googletest/tests/list_test_cases_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698