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

Side by Side Diff: test/actions/gyptest-default.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/actions/gyptest-all.py ('k') | test/additional-targets/gyptest-additional.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 simple actions when using the default build target. 8 Verifies simple actions when using the default build target.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 test = TestGyp.TestGyp(workdir='workarea_default') 13 test = TestGyp.TestGyp(workdir='workarea_default')
14 14
15 test.run_gyp('actions.gyp', chdir='src') 15 test.run_gyp('actions.gyp', chdir='src')
16 16
17 test.relocate('src', 'relocate/src') 17 test.relocate('src', 'relocate/src')
18 18
19 # Some gyp files use an action that mentions an output but never 19 # Some gyp files use an action that mentions an output but never
20 # writes it as a means to making the action run on every build. That 20 # writes it as a means to making the action run on every build. That
21 # doesn't mesh well with ninja's semantics. TODO(evan): figure out 21 # doesn't mesh well with ninja's semantics. TODO(evan): figure out
22 # how to work always-run actions in to ninja. 22 # how to work always-run actions in to ninja.
23 # Android also can't do this as it doesn't have order-only dependencies. 23 # Android also can't do this as it doesn't have order-only dependencies.
24 if test.format in ['ninja', 'android']: 24 if test.format in ['ninja', 'android', 'xcode-ninja']:
25 test.build('actions.gyp', test.ALL, chdir='relocate/src') 25 test.build('actions.gyp', test.ALL, chdir='relocate/src')
26 else: 26 else:
27 # Test that an "always run" action increases a counter on multiple 27 # Test that an "always run" action increases a counter on multiple
28 # invocations, and that a dependent action updates in step. 28 # invocations, and that a dependent action updates in step.
29 test.build('actions.gyp', chdir='relocate/src') 29 test.build('actions.gyp', chdir='relocate/src')
30 test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '1') 30 test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '1')
31 test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '1') 31 test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '1')
32 test.build('actions.gyp', chdir='relocate/src') 32 test.build('actions.gyp', chdir='relocate/src')
33 test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2') 33 test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
34 test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2') 34 test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
(...skipping 25 matching lines...) Expand all
60 expect = "Hello from generate_main.py\n" 60 expect = "Hello from generate_main.py\n"
61 61
62 if test.format == 'xcode': 62 if test.format == 'xcode':
63 chdir = 'relocate/src/subdir3' 63 chdir = 'relocate/src/subdir3'
64 else: 64 else:
65 chdir = 'relocate/src' 65 chdir = 'relocate/src'
66 test.run_built_executable('null_input', chdir=chdir, stdout=expect) 66 test.run_built_executable('null_input', chdir=chdir, stdout=expect)
67 67
68 68
69 test.pass_test() 69 test.pass_test()
OLDNEW
« no previous file with comments | « test/actions/gyptest-all.py ('k') | test/additional-targets/gyptest-additional.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698