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

Unified Diff: tests/run_isolated_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
« no previous file with comments | « tests/run_isolated/regen_test_data.py ('k') | tests/run_test_cases/output.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/run_isolated_smoke_test.py
diff --git a/tests/run_isolated_smoke_test.py b/tests/run_isolated_smoke_test.py
index 85b3202b2ac3e592b6058242c76f7c3e1038eef4..33643d061b09548402e6c13cc1f9700487a4c109 100755
--- a/tests/run_isolated_smoke_test.py
+++ b/tests/run_isolated_smoke_test.py
@@ -140,36 +140,40 @@ class RunSwarmStep(unittest.TestCase):
def test_result(self):
# Loads an arbitrary .isolated on the file system.
- isolated = os.path.join(self.data_dir, 'gtest_fake.isolated')
+ isolated = os.path.join(self.data_dir, 'repeated_files.isolated')
expected = [
'state.json',
- self._store('gtest_fake.py'),
+ self._store('file1.txt'),
+ self._store('file1_copy.txt'),
+ self._store('repeated_files.py'),
calc_sha1(isolated),
]
- out, _, returncode = self._run(
+ out, err, returncode = self._run(
self._generate_args_with_isolated(isolated))
if not VERBOSE:
- self.assertEqual(1070, len(out), out)
- self.assertEqual(6, returncode)
+ self.assertEqual('Success\n', out, (out, err))
+ self.assertEqual(0, returncode)
actual = list_files_tree(self.cache)
- self.assertEqual(sorted(expected), actual)
+ self.assertEqual(sorted(set(expected)), actual)
def test_hash(self):
# Loads the .isolated from the store as a hash.
- result_sha1 = self._store('gtest_fake.isolated')
+ result_sha1 = self._store('repeated_files.isolated')
expected = [
'state.json',
- self._store('gtest_fake.py'),
+ self._store('file1.txt'),
+ self._store('file1_copy.txt'),
+ self._store('repeated_files.py'),
result_sha1,
]
out, err, returncode = self._run(self._generate_args_with_sha1(result_sha1))
if not VERBOSE:
self.assertEqual('', err)
- self.assertEqual(1070, len(out), out)
- self.assertEqual(6, returncode)
+ self.assertEqual('Success\n', out, out)
+ self.assertEqual(0, returncode)
actual = list_files_tree(self.cache)
- self.assertEqual(sorted(expected), actual)
+ self.assertEqual(sorted(set(expected)), actual)
def test_download_isolated(self):
out_dir = None
@@ -232,14 +236,12 @@ class RunSwarmStep(unittest.TestCase):
def test_includes(self):
# Loads an .isolated that includes another one.
- # References manifest1.isolated and gtest_fake.isolated. Maps file3.txt as
- # file2.txt.
+ # References manifest2.isolated and repeated_files.isolated. Maps file3.txt
+ # as file2.txt.
result_sha1 = self._store('check_files.isolated')
expected = [
'state.json',
self._store('check_files.py'),
- self._store('gtest_fake.py'),
- self._store('gtest_fake.isolated'),
self._store('file1.txt'),
self._store('file3.txt'),
# Maps file1.txt.
@@ -247,6 +249,8 @@ class RunSwarmStep(unittest.TestCase):
# References manifest1.isolated. Maps file2.txt but it is overriden.
self._store('manifest2.isolated'),
result_sha1,
+ self._store('repeated_files.py'),
+ self._store('repeated_files.isolated'),
]
out, err, returncode = self._run(self._generate_args_with_sha1(result_sha1))
if not VERBOSE:
« no previous file with comments | « tests/run_isolated/regen_test_data.py ('k') | tests/run_test_cases/output.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698