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

Side by Side Diff: test/rename/gyptest-filecase.py

Issue 10907140: ninja: Survive case-only file renames on case-insensitive filesystems. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 3 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2010 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """
8 Checks that files whose file case changes get rebuilt correctly.
9 """
10
11 import os
12 import TestGyp
13
14 test = TestGyp.TestGyp()
15 CHDIR = 'filecase'
16 test.run_gyp('test.gyp', chdir=CHDIR)
17 test.build('test.gyp', test.ALL, chdir=CHDIR)
18
19 os.rename('filecase/file.c', 'filecase/fIlE.c')
20 test.write('filecase/test.gyp',
21 test.read('filecase/test.gyp').replace('file.c', 'fIlE.c'))
22 test.run_gyp('test.gyp', chdir=CHDIR)
23 test.build('test.gyp', test.ALL, chdir=CHDIR)
24
25
26 # Check that having files that differ just in their case still work on
27 # case-sensitive file systems.
28 test.write('filecase/FiLe.c', 'int f(); int main() { return f(); }')
29 test.write('filecase/fIlE.c', 'int f() { return 42; }')
30 is_case_sensitive = test.read('filecase/FiLe.c') != test.read('filecase/fIlE.c')
31 if is_case_sensitive:
32 test.run_gyp('test-casesensitive.gyp', chdir=CHDIR)
33 test.build('test-casesensitive.gyp', test.ALL, chdir=CHDIR)
34
35 test.pass_test()
OLDNEW
« pylib/gyp/generator/ninja.py ('K') | « test/rename/filecase/test-casesensitive.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698