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

Side by Side Diff: tests/run_isolated_smoke_test.py

Issue 51383003: Report all swarming and isolate fatal errors in a consistent way. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: make isolate_smoke_test less strict regarding exact contents of stderr Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/isolate_smoke_test.py ('k') | utils/tools.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import hashlib 6 import hashlib
7 import json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 def test_fail_empty_isolated(self): 181 def test_fail_empty_isolated(self):
182 result_hash = self._store_result({}) 182 result_hash = self._store_result({})
183 expected = [ 183 expected = [
184 'state.json', 184 'state.json',
185 result_hash, 185 result_hash,
186 ] 186 ]
187 out, err, returncode = self._run(self._generate_args_with_hash(result_hash)) 187 out, err, returncode = self._run(self._generate_args_with_hash(result_hash))
188 if not VERBOSE: 188 if not VERBOSE:
189 self.assertEqual('', out) 189 self.assertEqual('', out)
190 self.assertEqual('No command to run\n', err) 190 self.assertIn('No command to run\n', err)
191 self.assertEqual(1, returncode) 191 self.assertEqual(1, returncode)
192 actual = list_files_tree(self.cache) 192 actual = list_files_tree(self.cache)
193 self.assertEqual(sorted(expected), actual) 193 self.assertEqual(sorted(expected), actual)
194 194
195 def test_includes(self): 195 def test_includes(self):
196 # Loads an .isolated that includes another one. 196 # Loads an .isolated that includes another one.
197 197
198 # References manifest2.isolated and repeated_files.isolated. Maps file3.txt 198 # References manifest2.isolated and repeated_files.isolated. Maps file3.txt
199 # as file2.txt. 199 # as file2.txt.
200 result_hash = self._store('check_files.isolated') 200 result_hash = self._store('check_files.isolated')
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 self.assertEqual(0, returncode) 269 self.assertEqual(0, returncode)
270 270
271 self.assertEqual(os.stat(os.path.join(self.data_dir, 'file1.txt')).st_size, 271 self.assertEqual(os.stat(os.path.join(self.data_dir, 'file1.txt')).st_size,
272 os.stat(cached_file_path).st_size) 272 os.stat(cached_file_path).st_size)
273 273
274 274
275 if __name__ == '__main__': 275 if __name__ == '__main__':
276 VERBOSE = '-v' in sys.argv 276 VERBOSE = '-v' in sys.argv
277 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR) 277 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR)
278 unittest.main() 278 unittest.main()
OLDNEW
« no previous file with comments | « tests/isolate_smoke_test.py ('k') | utils/tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698