Pull in relevant targets when using xcode-ninja
The tests gyptest-actions, gyptest-copies and gyptest-rules fail when
using the xcode-ninja generator because xcode-ninja (by design) only
creates targets for proper executables. In order for these three tests
to pass, the targets they rely on need to be included explicitly.
BUG=gyp:442
TEST=Run
./gyptest.py -f xcode-ninja test/generator-output/
Expected: all tests pass (instead of failing the three mentioned above).
R=sdefresne@chromium.org, justincohen@chromium.org
Review URL: https://codereview.chromium.org/423753003
git-svn-id: http://gyp.googlecode.com/svn/trunk@1961 78cadc50-ecff-11dd-a971-7dbc132099af
diff --git a/test/generator-output/gyptest-actions.py b/test/generator-output/gyptest-actions.py
index 2bd09c8..8c912e4 100755
--- a/test/generator-output/gyptest-actions.py
+++ b/test/generator-output/gyptest-actions.py
@@ -18,6 +18,7 @@
test.writable(test.workpath('actions'), False)
test.run_gyp('actions.gyp',
'--generator-output=' + test.workpath('gypfiles'),
+ '-G', 'xcode_ninja_target_pattern=^pull_in_all_actions$',
chdir='actions')
test.writable(test.workpath('actions'), True)
diff --git a/test/generator-output/gyptest-copies.py b/test/generator-output/gyptest-copies.py
index 7524b17..909aebf 100755
--- a/test/generator-output/gyptest-copies.py
+++ b/test/generator-output/gyptest-copies.py
@@ -18,6 +18,7 @@
test.run_gyp('copies.gyp',
'--generator-output=' + test.workpath('gypfiles'),
+ '-G', 'xcode_ninja_target_pattern=^(?!copies_null)',
chdir='copies')
test.writable(test.workpath('copies'), True)
@@ -39,7 +40,7 @@
if test.format == 'xcode':
chdir = 'relocate/copies/build'
-elif test.format in ['make', 'ninja', 'cmake']:
+elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
chdir = 'relocate/gypfiles/out'
else:
chdir = 'relocate/gypfiles'
@@ -50,7 +51,7 @@
if test.format == 'xcode':
chdir = 'relocate/copies/subdir/build'
-elif test.format in ['make', 'ninja', 'cmake']:
+elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
chdir = 'relocate/gypfiles/out'
else:
chdir = 'relocate/gypfiles'
diff --git a/test/generator-output/gyptest-rules.py b/test/generator-output/gyptest-rules.py
index 324d5c2..b95e005 100755
--- a/test/generator-output/gyptest-rules.py
+++ b/test/generator-output/gyptest-rules.py
@@ -17,6 +17,7 @@
test.run_gyp('rules.gyp',
'--generator-output=' + test.workpath('gypfiles'),
+ '-G', 'xcode_ninja_target_pattern=^pull_in_all_actions$',
chdir='rules')
test.writable(test.workpath('rules'), True)