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

Unified Diff: tools/isolate/data/trace_inputs/child2.py

Issue 10091011: Added function to get native path case on Windows and OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase against 10080013 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
« no previous file with comments | « no previous file | tools/isolate/isolate.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « no previous file | tools/isolate/isolate.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698