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

Side by Side Diff: tools/isolate/data/isolate/child.py

Issue 10068032: Rewrite isolate_smoke_test.py to increase the coverage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _execute() is now less ambiguous, still with test case name verification Created 8 years, 8 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 | « no previous file | tools/isolate/data/isolate/fail.isolate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
5
6 import os
7 import sys
8
9
10 def main():
11 print 'child: verify the test data files were mapped properly'
12 files = sorted(os.listdir('files1'))
13 tree = {
14 'test_file1.txt': 'Foo\n',
15 'test_file2.txt': 'Bar\n',
16 }
17
18 # For now, ignore .svn directory, which happens to be there with --mode=trace
19 # from a svn checkout. The file shouldn't be there when --mode=run is used.
20 # TODO(maruel): Differentiate between the two modes and detect .svn
21 # directories in --mode=run.
22 if '.svn' in files:
23 files.remove('.svn')
24
25 if files != sorted(tree):
26 print '%s != %s' % (files, sorted(tree))
27 return 2
28 for k, v in tree.iteritems():
29 content = open(os.path.join('files1', k), 'rb').read()
30 if v != content:
31 print '%s: %r != %r' % (k, v, content)
32 return 3
33
34 if sys.argv[1] == '--ok':
35 return 0
36 elif sys.argv[1] == '--fail':
37 return 1
38 return 4
39
40
41 if __name__ == '__main__':
42 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/isolate/data/isolate/fail.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698