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

Side by Side Diff: tools/isolate/run_test_from_archive_test.py

Issue 10876044: run_test_from_archive: Rewritten to be more parallelized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase againt HEAD and include fixes Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/isolate/run_test_from_archive_smoke_test.py ('k') | no next file » | 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 json 6 import json
7 import logging 7 import logging
8 import sys 8 import sys
9 import unittest 9 import unittest
10 10
(...skipping 12 matching lines...) Expand all
23 u'a': { 23 u'a': {
24 u'link': u'somewhere', 24 u'link': u'somewhere',
25 u'mode': 123, 25 u'mode': 123,
26 u'timestamp': 456, 26 u'timestamp': 456,
27 }, 27 },
28 u'b': { 28 u'b': {
29 u'mode': 123, 29 u'mode': 123,
30 u'sha-1': u'0123456789abcdef0123456789abcdef01234567' 30 u'sha-1': u'0123456789abcdef0123456789abcdef01234567'
31 } 31 }
32 }, 32 },
33 u'includes': [u'0123456789abcdef0123456789abcdef01234567'],
33 u'read_only': False, 34 u'read_only': False,
34 u'relative_cwd': u'somewhere_else' 35 u'relative_cwd': u'somewhere_else'
35 } 36 }
36 m = run_test_from_archive.load_manifest(json.dumps(data)) 37 m = run_test_from_archive.load_manifest(json.dumps(data))
37 self.assertEquals(data, m) 38 self.assertEquals(data, m)
38 39
39 def test_load_manifest_bad(self): 40 def test_load_manifest_bad(self):
40 data = { 41 data = {
41 u'files': { 42 u'files': {
42 u'a': { 43 u'a': {
43 u'link': u'somewhere', 44 u'link': u'somewhere',
44 u'sha-1': u'0123456789abcdef0123456789abcdef01234567' 45 u'sha-1': u'0123456789abcdef0123456789abcdef01234567'
45 } 46 }
46 }, 47 },
47 } 48 }
48 try: 49 try:
49 run_test_from_archive.load_manifest(json.dumps(data)) 50 run_test_from_archive.load_manifest(json.dumps(data))
50 self.fail() 51 self.fail()
51 except run_test_from_archive.ConfigError: 52 except run_test_from_archive.ConfigError:
52 pass 53 pass
53 54
54 55
55 56
56 if __name__ == '__main__': 57 if __name__ == '__main__':
57 logging.basicConfig( 58 logging.basicConfig(
58 level=(logging.DEBUG if '-v' in sys.argv else logging.ERROR)) 59 level=(logging.DEBUG if '-v' in sys.argv else logging.ERROR))
59 unittest.main() 60 unittest.main()
OLDNEW
« no previous file with comments | « tools/isolate/run_test_from_archive_smoke_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698