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

Side by Side Diff: test/errors/gyptest-errors.py

Issue 344573002: Introduce '--no-duplicate-basename-check' option to disable the check of duplicate basenames (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Rebase with r1946 Created 6 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/input.py ('k') | test/same-source-file-name/gyptest-fail-shared.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 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 os
12 import sys
13
11 import TestGyp 14 import TestGyp
12 import TestCmd 15 import TestCmd
13 16
14 # TODO(sbc): Remove the use of match_re below, done because scons 17 # TODO(sbc): Remove the use of match_re below, done because scons
15 # error messages were not consistent with other generators. 18 # error messages were not consistent with other generators.
16 # Also remove input.py:generator_wants_absolute_build_file_paths. 19 # Also remove input.py:generator_wants_absolute_build_file_paths.
17 20
18 test = TestGyp.TestGyp() 21 test = TestGyp.TestGyp()
19 22
20 stderr = ('gyp: Duplicate target definitions for ' 23 stderr = ('gyp: Duplicate target definitions for '
(...skipping 11 matching lines...) Expand all
32 match=TestCmd.match_re) 35 match=TestCmd.match_re)
33 36
34 stderr = ("gyp: Key 'targets' repeated at level 1 with key path '' while " 37 stderr = ("gyp: Key 'targets' repeated at level 1 with key path '' while "
35 "reading .*duplicate_node.gyp.*") 38 "reading .*duplicate_node.gyp.*")
36 test.run_gyp('duplicate_node.gyp', '--check', status=1, stderr=stderr, 39 test.run_gyp('duplicate_node.gyp', '--check', status=1, stderr=stderr,
37 match=TestCmd.match_re_dotall) 40 match=TestCmd.match_re_dotall)
38 41
39 stderr = 'gyp: Duplicate basenames in sources section, see list above\n' 42 stderr = 'gyp: Duplicate basenames in sources section, see list above\n'
40 test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr) 43 test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr)
41 44
45 # Check if '--no-duplicate-basename-check' works.
46 if ((test.format == 'make' and sys.platform == 'darwin') or
47 (test.format == 'msvs' and
48 int(os.environ.get('GYP_MSVS_VERSION', 2010)) < 2010)):
49 stderr = 'gyp: Duplicate basenames in sources section, see list above\n'
50 test.run_gyp('duplicate_basenames.gyp', '--no-duplicate-basename-check',
51 status=1, stderr=stderr)
52 else:
53 test.run_gyp('duplicate_basenames.gyp', '--no-duplicate-basename-check')
54
42 stderr = ("gyp: Dependency '.*missing_dep.gyp:missing.gyp#target' not found " 55 stderr = ("gyp: Dependency '.*missing_dep.gyp:missing.gyp#target' not found "
43 "while trying to load target .*missing_dep.gyp:foo#target\n") 56 "while trying to load target .*missing_dep.gyp:foo#target\n")
44 test.run_gyp('missing_dep.gyp', status=1, stderr=stderr, 57 test.run_gyp('missing_dep.gyp', status=1, stderr=stderr,
45 match=TestCmd.match_re) 58 match=TestCmd.match_re)
46 59
47 test.pass_test() 60 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/input.py ('k') | test/same-source-file-name/gyptest-fail-shared.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698