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

Unified Diff: tests/trace_inputs/child2.py

Issue 11048019: Add everything from src/tools/isolate r159537. (Closed) Base URL: https://git.chromium.org/chromium/tools/swarm_client.git@master
Patch Set: Ensure --similarity is sticky Created 8 years, 2 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
« no previous file with comments | « tests/trace_inputs/child1.py ('k') | tests/trace_inputs/files1/bar » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/trace_inputs/child2.py
diff --git a/tests/trace_inputs/child2.py b/tests/trace_inputs/child2.py
new file mode 100755
index 0000000000000000000000000000000000000000..f873389fe9a506a46f8cb27b1bd493966c3ba2f9
--- /dev/null
+++ b/tests/trace_inputs/child2.py
@@ -0,0 +1,44 @@
+#!/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
+import time
+
+
+def main():
+ print 'child2'
+ # Introduce a race condition with the parent so the parent may have a chance
+ # to exit before the child. Will be random.
+ time.sleep(.01)
+
+ if sys.platform in ('darwin', 'win32'):
+ # Check for case-insensitive file system. This happens on Windows and OSX.
+ open('Test_File.txt', 'rb').close()
+ else:
+ open('test_file.txt', 'rb').close()
+
+ expected = {
+ 'bar': 'Foo\n',
+ 'foo': 'Bar\n',
+ }
+
+ root = 'files1'
+ actual = dict(
+ (filename, open(os.path.join(root, filename), 'rb').read())
+ for filename in (os.listdir(root))
+ if (filename != 'do_not_care.txt' and
+ os.path.isfile(os.path.join(root, filename))))
+
+ if actual != expected:
+ print 'Failure'
+ print actual
+ print expected
+ return 1
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « tests/trace_inputs/child1.py ('k') | tests/trace_inputs/files1/bar » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698