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

Side by Side Diff: test/sibling/gyptest-relocate.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/sibling/gyptest-all.py ('k') | test/toplevel-dir/gyptest-toplevel-dir.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 import TestGyp 7 import TestGyp
8 8
9 test = TestGyp.TestGyp() 9 test = TestGyp.TestGyp()
10 10
11 # The xcode-ninja generator handles gypfiles which are not at the
12 # project root incorrectly.
13 # cf. https://code.google.com/p/gyp/issues/detail?id=460
14 if test.format == 'xcode-ninja':
15 test.skip_test()
16
11 test.run_gyp('build/all.gyp', chdir='src') 17 test.run_gyp('build/all.gyp', chdir='src')
12 18
13 test.relocate('src', 'relocate/src') 19 test.relocate('src', 'relocate/src')
14 20
15 test.build('build/all.gyp', test.ALL, chdir='relocate/src') 21 test.build('build/all.gyp', test.ALL, chdir='relocate/src')
16 22
17 chdir = 'relocate/src/build' 23 chdir = 'relocate/src/build'
18 24
19 # The top-level Makefile is in the directory where gyp was run. 25 # The top-level Makefile is in the directory where gyp was run.
20 # TODO(mmoss) Should the Makefile go in the directory of the passed in .gyp 26 # TODO(mmoss) Should the Makefile go in the directory of the passed in .gyp
21 # file? What about when passing in multiple .gyp files? Would sub-project 27 # file? What about when passing in multiple .gyp files? Would sub-project
22 # Makefiles (see http://codereview.chromium.org/340008 comments) solve this? 28 # Makefiles (see http://codereview.chromium.org/340008 comments) solve this?
23 if test.format in ('make', 'ninja', 'cmake'): 29 if test.format in ('make', 'ninja', 'cmake'):
24 chdir = 'relocate/src' 30 chdir = 'relocate/src'
25 31
26 if test.format == 'xcode': 32 if test.format == 'xcode':
27 chdir = 'relocate/src/prog1' 33 chdir = 'relocate/src/prog1'
28 test.run_built_executable('program1', 34 test.run_built_executable('program1',
29 chdir=chdir, 35 chdir=chdir,
30 stdout="Hello from prog1.c\n") 36 stdout="Hello from prog1.c\n")
31 37
32 if test.format == 'xcode': 38 if test.format == 'xcode':
33 chdir = 'relocate/src/prog2' 39 chdir = 'relocate/src/prog2'
34 test.run_built_executable('program2', 40 test.run_built_executable('program2',
35 chdir=chdir, 41 chdir=chdir,
36 stdout="Hello from prog2.c\n") 42 stdout="Hello from prog2.c\n")
37 43
38 test.pass_test() 44 test.pass_test()
OLDNEW
« no previous file with comments | « test/sibling/gyptest-all.py ('k') | test/toplevel-dir/gyptest-toplevel-dir.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698