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

Side by Side Diff: test/intermediate_dir/gyptest-intermediate-dir.py

Issue 421453003: Add TestGypXcodeNinja to run tests against the xcode-ninja generator (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase onto origin/master Created 6 years 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
« no previous file with comments | « test/gyp-defines/gyptest-multiple-values.py ('k') | test/lib/TestGyp.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies that targets have independent INTERMEDIATE_DIRs. 8 Verifies that targets have independent INTERMEDIATE_DIRs.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 test = TestGyp.TestGyp() 13 test = TestGyp.TestGyp()
14 14
15 test.run_gyp('test.gyp', chdir='src') 15 test.run_gyp('test.gyp', chdir='src')
16
16 test.build('test.gyp', 'target1', chdir='src') 17 test.build('test.gyp', 'target1', chdir='src')
17 # Check stuff exists. 18 # Check stuff exists.
18 intermediate_file1 = test.read('src/outfile.txt') 19 intermediate_file1 = test.read('src/outfile.txt')
19 test.must_contain(intermediate_file1, 'target1') 20 test.must_contain(intermediate_file1, 'target1')
20 21
21 shared_intermediate_file1 = test.read('src/shared_outfile.txt') 22 shared_intermediate_file1 = test.read('src/shared_outfile.txt')
22 test.must_contain(shared_intermediate_file1, 'shared_target1') 23 test.must_contain(shared_intermediate_file1, 'shared_target1')
23 24
24 test.run_gyp('test2.gyp', chdir='src') 25 test.run_gyp('test2.gyp', chdir='src')
26
25 # Force the shared intermediate to be rebuilt. 27 # Force the shared intermediate to be rebuilt.
26 test.sleep() 28 test.sleep()
27 test.touch('src/shared_infile.txt') 29 test.touch('src/shared_infile.txt')
28 test.build('test2.gyp', 'target2', chdir='src') 30 test.build('test2.gyp', 'target2', chdir='src')
29 # Check INTERMEDIATE_DIR file didn't get overwritten but SHARED_INTERMEDIATE_DIR 31 # Check INTERMEDIATE_DIR file didn't get overwritten but SHARED_INTERMEDIATE_DIR
30 # file did. 32 # file did.
31 intermediate_file2 = test.read('src/outfile.txt') 33 intermediate_file2 = test.read('src/outfile.txt')
32 test.must_contain(intermediate_file1, 'target1') 34 test.must_contain(intermediate_file1, 'target1')
33 test.must_contain(intermediate_file2, 'target2') 35 test.must_contain(intermediate_file2, 'target2')
34 36
35 shared_intermediate_file2 = test.read('src/shared_outfile.txt') 37 shared_intermediate_file2 = test.read('src/shared_outfile.txt')
36 if shared_intermediate_file1 != shared_intermediate_file2: 38 if shared_intermediate_file1 != shared_intermediate_file2:
37 test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2) 39 test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2)
38 40
39 test.must_contain(shared_intermediate_file1, 'shared_target2') 41 test.must_contain(shared_intermediate_file1, 'shared_target2')
40 test.must_contain(shared_intermediate_file2, 'shared_target2') 42 test.must_contain(shared_intermediate_file2, 'shared_target2')
41 43
42 test.pass_test() 44 test.pass_test()
OLDNEW
« no previous file with comments | « test/gyp-defines/gyptest-multiple-values.py ('k') | test/lib/TestGyp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698