Index: tools/isolate/data/trace_inputs/child2.py |
diff --git a/tools/isolate/data/trace_inputs/child2.py b/tools/isolate/data/trace_inputs/child2.py |
index cfcac3f3ec677d9483e34070e23c3362a5bc0ebd..6b1836477b28203c78c651219e1f1873ca51fa2f 100644 |
--- a/tools/isolate/data/trace_inputs/child2.py |
+++ b/tools/isolate/data/trace_inputs/child2.py |
@@ -2,11 +2,26 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import sys |
import time |
-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) |
-# Do not do anything with it. |
-open('test_file.txt') |
+ |
+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) |
+ # Do not do anything with it. |
+ open('test_file.txt') |
+ # Check for case-insensitive file system. This happens on Windows and OSX. |
+ try: |
+ open('Test_File.txt') |
+ except OSError: |
+ # Pass on other OSes since this code assumes only win32 has case-insensitive |
+ # path. This is not strictly true. |
+ if sys.platform not in ('darwin', 'win32'): |
+ raise |
+ |
+ |
+if __name__ == '__main__': |
+ sys.exit(main()) |