diff options
Diffstat (limited to 'test/errors')
-rw-r--r-- | test/errors/dependency_cycle.gyp | 23 | ||||
-rw-r--r-- | test/errors/file_cycle0.gyp | 17 | ||||
-rw-r--r-- | test/errors/file_cycle1.gyp | 13 | ||||
-rwxr-xr-x | test/errors/gyptest-errors.py | 8 |
4 files changed, 61 insertions, 0 deletions
diff --git a/test/errors/dependency_cycle.gyp b/test/errors/dependency_cycle.gyp new file mode 100644 index 00000000..eef44bc9 --- /dev/null +++ b/test/errors/dependency_cycle.gyp @@ -0,0 +1,23 @@ +# Copyright 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'target0', + 'type': 'none', + 'dependencies': [ 'target1' ], + }, + { + 'target_name': 'target1', + 'type': 'none', + 'dependencies': [ 'target2' ], + }, + { + 'target_name': 'target2', + 'type': 'none', + 'dependencies': [ 'target0' ], + }, + ], +} diff --git a/test/errors/file_cycle0.gyp b/test/errors/file_cycle0.gyp new file mode 100644 index 00000000..3bfafb6c --- /dev/null +++ b/test/errors/file_cycle0.gyp @@ -0,0 +1,17 @@ +# Copyright 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'top', + 'type': 'none', + 'dependencies': [ 'file_cycle1.gyp:middle' ], + }, + { + 'target_name': 'bottom', + 'type': 'none', + }, + ], +} diff --git a/test/errors/file_cycle1.gyp b/test/errors/file_cycle1.gyp new file mode 100644 index 00000000..fbd7a0d1 --- /dev/null +++ b/test/errors/file_cycle1.gyp @@ -0,0 +1,13 @@ +# Copyright 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'middle', + 'type': 'none', + 'dependencies': [ 'file_cycle0.gyp:bottom' ], + }, + ], +} diff --git a/test/errors/gyptest-errors.py b/test/errors/gyptest-errors.py index 5f66bac0..4612c16b 100755 --- a/test/errors/gyptest-errors.py +++ b/test/errors/gyptest-errors.py @@ -39,6 +39,14 @@ stderr = ("gyp: Key 'targets' repeated at level 1 with key path '' while " test.run_gyp('duplicate_node.gyp', '--check', status=1, stderr=stderr, match=TestCmd.match_re_dotall) +stderr = (".*target0.*target1.*target2.*target0.*") +test.run_gyp('dependency_cycle.gyp', status=1, stderr=stderr, + match=TestCmd.match_re_dotall) + +stderr = (".*file_cycle0.*file_cycle1.*file_cycle0.*") +test.run_gyp('file_cycle0.gyp', status=1, stderr=stderr, + match=TestCmd.match_re_dotall) + stderr = 'gyp: Duplicate basenames in sources section, see list above\n' test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr) |