22
25
test.run_gyp('duplicate_targets.gyp', status=1, stderr=stderr,
23
26
match=TestCmd.match_re)
25
stderr = ('gyp: Unable to find targets in build file .*missing_targets.gyp '
26
'while trying to load missing_targets.gyp\n')
28
stderr = ('.*: Unable to find targets in build file .*missing_targets.gyp.*')
27
29
test.run_gyp('missing_targets.gyp', status=1, stderr=stderr,
28
match=TestCmd.match_re)
30
match=TestCmd.match_re_dotall)
30
32
stderr = ('gyp: rule bar exists in duplicate, target '
31
33
'.*duplicate_rule.gyp:foo#target\n')
33
35
match=TestCmd.match_re)
35
37
stderr = ("gyp: Key 'targets' repeated at level 1 with key path '' while "
36
"reading .*duplicate_node.gyp while trying to load "
37
"duplicate_node.gyp\n")
38
"reading .*duplicate_node.gyp.*")
38
39
test.run_gyp('duplicate_node.gyp', '--check', status=1, stderr=stderr,
39
match=TestCmd.match_re)
40
match=TestCmd.match_re_dotall)
42
stderr = (".*target0.*target1.*target2.*target0.*")
43
test.run_gyp('dependency_cycle.gyp', status=1, stderr=stderr,
44
match=TestCmd.match_re_dotall)
46
stderr = (".*file_cycle0.*file_cycle1.*file_cycle0.*")
47
test.run_gyp('file_cycle0.gyp', status=1, stderr=stderr,
48
match=TestCmd.match_re_dotall)
41
50
stderr = 'gyp: Duplicate basenames in sources section, see list above\n'
42
51
test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr)
53
# Check if '--no-duplicate-basename-check' works.
54
if ((test.format == 'make' and sys.platform == 'darwin') or
55
(test.format == 'msvs' and
56
int(os.environ.get('GYP_MSVS_VERSION', 2010)) < 2010)):
57
stderr = 'gyp: Duplicate basenames in sources section, see list above\n'
58
test.run_gyp('duplicate_basenames.gyp', '--no-duplicate-basename-check',
59
status=1, stderr=stderr)
61
test.run_gyp('duplicate_basenames.gyp', '--no-duplicate-basename-check')
44
63
stderr = ("gyp: Dependency '.*missing_dep.gyp:missing.gyp#target' not found "
45
64
"while trying to load target .*missing_dep.gyp:foo#target\n")
46
65
test.run_gyp('missing_dep.gyp', status=1, stderr=stderr,
47
66
match=TestCmd.match_re)
68
# Make sure invalid <!() command invocations say what command it was and
69
# mention the gyp file name. Use a "random" command name to trigger an ENOENT.
70
stderr = (".*invalid-command-name-egtyevNif3.*netDurj9.*missing_command.gyp.*")
71
test.run_gyp('missing_command.gyp', status=1, stderr=stderr,
72
match=TestCmd.match_re_dotall)
74
# Make sure <!() commands that error out result in a message that mentions
75
# the command and gyp file name
76
stderr = (".*python.*-c.*import sys.*sys.exit.*3.*error_command.gyp.*")
77
test.run_gyp('error_command.gyp', status=1, stderr=stderr,
78
match=TestCmd.match_re_dotall)