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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: tools/isolate/data/isolate/child.py
diff --git a/tools/isolate/data/isolate/child.py b/tools/isolate/data/isolate/child.py
new file mode 100755
index 0000000000000000000000000000000000000000..269a92cb769518f483785d3788fbb9a0af8dc95e
--- /dev/null
+++ b/tools/isolate/data/isolate/child.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import sys
+
+
+def main():
+ print 'child: verify the test data files were mapped properly'
+ files = os.listdir('files1')
+ tree = {
+ 'test_file1.txt': 'Foo\n',
+ 'test_file2.txt': 'Bar\n',
+ }
+ if files != tree.keys():
+ print '%s != %s' % (files, tree.keys())
+ return 2
+ for k, v in tree.iteritems():
+ content = open(os.path.join('files1', k), 'rb').read()
+ if v != content:
+ print '%s: %r != %r' % (k, v, content)
+ return 3
+
+ if sys.argv[1] == '--ok':
+ return 0
+ elif sys.argv[1] == '--fail':
+ return 1
+ return 4
+
+
+if __name__ == '__main__':
+ sys.exit(main())

Powered by Google App Engine
This is Rietveld 408576698