OLD | NEW |
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 Test that two targets with the same name generates an error. | 8 Test that two targets with the same name generates an error. |
9 """ | 9 """ |
10 | 10 |
11 import TestGyp | 11 import TestGyp |
12 import TestCmd | 12 import TestCmd |
13 | 13 |
14 # TODO(sbc): Remove the need for match_re below, and make scons | 14 # TODO(sbc): Remove the use of match_re below, done because scons |
15 # error messages consistent with other generators by removing | 15 # error messages were not consistent with other generators. |
16 # input.py:generator_wants_absolute_build_file_paths. | 16 # Also remove input.py:generator_wants_absolute_build_file_paths. |
17 | 17 |
18 test = TestGyp.TestGyp() | 18 test = TestGyp.TestGyp() |
19 | 19 |
20 stderr = ('gyp: Duplicate target definitions for ' | 20 stderr = ('gyp: Duplicate target definitions for ' |
21 '.*duplicate_targets.gyp:foo#target\n') | 21 '.*duplicate_targets.gyp:foo#target\n') |
22 test.run_gyp('duplicate_targets.gyp', status=1, stderr=stderr, | 22 test.run_gyp('duplicate_targets.gyp', status=1, stderr=stderr, |
23 match=TestCmd.match_re) | 23 match=TestCmd.match_re) |
24 | 24 |
25 stderr = ('gyp: Unable to find targets in build file .*missing_targets.gyp ' | 25 stderr = ('gyp: Unable to find targets in build file .*missing_targets.gyp ' |
26 'while trying to load missing_targets.gyp\n') | 26 'while trying to load missing_targets.gyp\n') |
(...skipping 13 matching lines...) Expand all Loading... |
40 | 40 |
41 stderr = 'gyp: Duplicate basenames in sources section, see list above\n' | 41 stderr = 'gyp: Duplicate basenames in sources section, see list above\n' |
42 test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr) | 42 test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr) |
43 | 43 |
44 stderr = ("gyp: Dependency '.*missing_dep.gyp:missing.gyp#target' not found " | 44 stderr = ("gyp: Dependency '.*missing_dep.gyp:missing.gyp#target' not found " |
45 "while trying to load target .*missing_dep.gyp:foo#target\n") | 45 "while trying to load target .*missing_dep.gyp:foo#target\n") |
46 test.run_gyp('missing_dep.gyp', status=1, stderr=stderr, | 46 test.run_gyp('missing_dep.gyp', status=1, stderr=stderr, |
47 match=TestCmd.match_re) | 47 match=TestCmd.match_re) |
48 | 48 |
49 test.pass_test() | 49 test.pass_test() |
OLD | NEW |