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

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

Issue 10019014: Convert isolate.py to exclusively use .isolate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reduce copy pasted constants 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
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 = os.listdir('files1')
13 tree = {
14 'test_file1.txt': 'Foo\n',
15 'test_file2.txt': 'Bar\n',
16 }
17 if files != tree.keys():
18 print '%s != %s' % (files, tree.keys())
19 return 2
20 for k, v in tree.iteritems():
21 content = open(os.path.join('files1', k), 'rb').read()
22 if v != content:
23 print '%s: %r != %r' % (k, v, content)
24 return 3
25
26 if sys.argv[1] == '--ok':
27 return 0
28 elif sys.argv[1] == '--fail':
29 return 1
30 return 4
31
32
33 if __name__ == '__main__':
34 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698