diff options
Diffstat (limited to 'deps/gyp/test/configurations')
29 files changed, 0 insertions, 669 deletions
diff --git a/deps/gyp/test/configurations/basics/configurations.c b/deps/gyp/test/configurations/basics/configurations.c deleted file mode 100644 index 39e13c9c83..0000000000 --- a/deps/gyp/test/configurations/basics/configurations.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdio.h> - -int main(void) -{ -#ifdef FOO - printf("Foo configuration\n"); -#endif -#ifdef DEBUG - printf("Debug configuration\n"); -#endif -#ifdef RELEASE - printf("Release configuration\n"); -#endif - return 0; -} diff --git a/deps/gyp/test/configurations/basics/configurations.gyp b/deps/gyp/test/configurations/basics/configurations.gyp deleted file mode 100644 index 93f1d8d5c7..0000000000 --- a/deps/gyp/test/configurations/basics/configurations.gyp +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2009 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': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - 'configurations': { - 'Debug': { - 'defines': [ - 'DEBUG', - ], - }, - 'Release': { - 'defines': [ - 'RELEASE', - ], - }, - 'Foo': { - 'defines': [ - 'FOO', - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/basics/gyptest-configurations.py b/deps/gyp/test/configurations/basics/gyptest-configurations.py deleted file mode 100755 index 27cd2e87d2..0000000000 --- a/deps/gyp/test/configurations/basics/gyptest-configurations.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 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. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('configurations.gyp') - -test.set_configuration('Release') -test.build('configurations.gyp') -test.run_built_executable('configurations', stdout="Release configuration\n") - -test.set_configuration('Debug') -test.build('configurations.gyp') -test.run_built_executable('configurations', stdout="Debug configuration\n") - -test.set_configuration('Foo') -test.build('configurations.gyp') -test.run_built_executable('configurations', stdout="Foo configuration\n") - -test.pass_test() diff --git a/deps/gyp/test/configurations/inheritance/configurations.c b/deps/gyp/test/configurations/inheritance/configurations.c deleted file mode 100644 index ebb9f8450e..0000000000 --- a/deps/gyp/test/configurations/inheritance/configurations.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <stdio.h> - -int main(void) -{ -#ifdef BASE - printf("Base configuration\n"); -#endif -#ifdef COMMON - printf("Common configuration\n"); -#endif -#ifdef COMMON2 - printf("Common2 configuration\n"); -#endif -#ifdef DEBUG - printf("Debug configuration\n"); -#endif -#ifdef RELEASE - printf("Release configuration\n"); -#endif - return 0; -} diff --git a/deps/gyp/test/configurations/inheritance/configurations.gyp b/deps/gyp/test/configurations/inheritance/configurations.gyp deleted file mode 100644 index 9441376b4d..0000000000 --- a/deps/gyp/test/configurations/inheritance/configurations.gyp +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2009 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. - -{ - 'target_defaults': { - 'configurations': { - 'Base': { - 'abstract': 1, - 'defines': ['BASE'], - }, - 'Common': { - 'abstract': 1, - 'inherit_from': ['Base'], - 'defines': ['COMMON'], - }, - 'Common2': { - 'abstract': 1, - 'defines': ['COMMON2'], - }, - 'Debug': { - 'inherit_from': ['Common', 'Common2'], - 'defines': ['DEBUG'], - }, - 'Release': { - 'inherit_from': ['Common', 'Common2'], - 'defines': ['RELEASE'], - }, - }, - }, - 'targets': [ - { - 'target_name': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - }, - ], -} diff --git a/deps/gyp/test/configurations/inheritance/duplicates.gyp b/deps/gyp/test/configurations/inheritance/duplicates.gyp deleted file mode 100644 index 6930ce3b39..0000000000 --- a/deps/gyp/test/configurations/inheritance/duplicates.gyp +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - -{ - 'target_defaults': { - 'default_configuration': 'A', - 'configurations': { - 'A': { - 'defines': ['SOMETHING'], - }, - 'B': { - 'inherit_from': ['A'], - }, - }, - 'cflags': ['-g'], - }, - 'targets': [ - { - 'target_name': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - }, - ], -} diff --git a/deps/gyp/test/configurations/inheritance/duplicates.gypd.golden b/deps/gyp/test/configurations/inheritance/duplicates.gypd.golden deleted file mode 100644 index 719b70861e..0000000000 --- a/deps/gyp/test/configurations/inheritance/duplicates.gypd.golden +++ /dev/null @@ -1,12 +0,0 @@ -{'_DEPTH': '.', - 'included_files': ['duplicates.gyp'], - 'targets': [{'configurations': {'A': {'cflags': ['-g'], - 'defines': ['SOMETHING']}, - 'B': {'cflags': ['-g'], - 'defines': ['SOMETHING'], - 'inherit_from': ['A']}}, - 'default_configuration': 'A', - 'sources': ['configurations.c'], - 'target_name': 'configurations', - 'toolset': 'target', - 'type': 'executable'}]} diff --git a/deps/gyp/test/configurations/inheritance/gyptest-duplicates.py b/deps/gyp/test/configurations/inheritance/gyptest-duplicates.py deleted file mode 100755 index 46687b4549..0000000000 --- a/deps/gyp/test/configurations/inheritance/gyptest-duplicates.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -# 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. - -""" -Verifies that configurations do not duplicate other settings. -""" - -import TestGyp - -test = TestGyp.TestGyp(format='gypd') - -test.run_gyp('duplicates.gyp') - -# Verify the duplicates.gypd against the checked-in expected contents. -# -# Normally, we should canonicalize line endings in the expected -# contents file setting the Subversion svn:eol-style to native, -# but that would still fail if multiple systems are sharing a single -# workspace on a network-mounted file system. Consequently, we -# massage the Windows line endings ('\r\n') in the output to the -# checked-in UNIX endings ('\n'). - -contents = test.read('duplicates.gypd').replace( - '\r', '').replace('\\\\', '/') -expect = test.read('duplicates.gypd.golden').replace('\r', '') -if not test.match(contents, expect): - print "Unexpected contents of `duplicates.gypd'" - test.diff(expect, contents, 'duplicates.gypd ') - test.fail_test() - -test.pass_test() diff --git a/deps/gyp/test/configurations/inheritance/gyptest-inheritance.py b/deps/gyp/test/configurations/inheritance/gyptest-inheritance.py deleted file mode 100755 index 22c73a3754..0000000000 --- a/deps/gyp/test/configurations/inheritance/gyptest-inheritance.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 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. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('configurations.gyp') - -test.set_configuration('Release') -test.build('configurations.gyp') -test.run_built_executable('configurations', - stdout=('Base configuration\n' - 'Common configuration\n' - 'Common2 configuration\n' - 'Release configuration\n')) - -test.set_configuration('Debug') -test.build('configurations.gyp') -test.run_built_executable('configurations', - stdout=('Base configuration\n' - 'Common configuration\n' - 'Common2 configuration\n' - 'Debug configuration\n')) - -test.pass_test() diff --git a/deps/gyp/test/configurations/invalid/actions.gyp b/deps/gyp/test/configurations/invalid/actions.gyp deleted file mode 100644 index a6e42089eb..0000000000 --- a/deps/gyp/test/configurations/invalid/actions.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'actions': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/all_dependent_settings.gyp b/deps/gyp/test/configurations/invalid/all_dependent_settings.gyp deleted file mode 100644 index b16a245df5..0000000000 --- a/deps/gyp/test/configurations/invalid/all_dependent_settings.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'all_dependent_settings': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/configurations.gyp b/deps/gyp/test/configurations/invalid/configurations.gyp deleted file mode 100644 index 2cfc960049..0000000000 --- a/deps/gyp/test/configurations/invalid/configurations.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'configurations': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/dependencies.gyp b/deps/gyp/test/configurations/invalid/dependencies.gyp deleted file mode 100644 index 74633f3f11..0000000000 --- a/deps/gyp/test/configurations/invalid/dependencies.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'dependencies': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/direct_dependent_settings.gyp b/deps/gyp/test/configurations/invalid/direct_dependent_settings.gyp deleted file mode 100644 index 8a0f2e95ea..0000000000 --- a/deps/gyp/test/configurations/invalid/direct_dependent_settings.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'direct_dependent_settings': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/gyptest-configurations.py b/deps/gyp/test/configurations/invalid/gyptest-configurations.py deleted file mode 100755 index bd844b95dd..0000000000 --- a/deps/gyp/test/configurations/invalid/gyptest-configurations.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2010 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. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -# Keys that do not belong inside a configuration dictionary. -invalid_configuration_keys = [ - 'actions', - 'all_dependent_settings', - 'configurations', - 'dependencies', - 'direct_dependent_settings', - 'libraries', - 'link_settings', - 'sources', - 'standalone_static_library', - 'target_name', - 'type', -] - -test = TestGyp.TestGyp() - -for test_key in invalid_configuration_keys: - test.run_gyp('%s.gyp' % test_key, status=1, stderr=None) - expect = ['%s not allowed in the Debug configuration, found in target ' - '%s.gyp:configurations#target' % (test_key, test_key)] - test.must_contain_all_lines(test.stderr(), expect) - -test.pass_test() diff --git a/deps/gyp/test/configurations/invalid/libraries.gyp b/deps/gyp/test/configurations/invalid/libraries.gyp deleted file mode 100644 index c4014ed406..0000000000 --- a/deps/gyp/test/configurations/invalid/libraries.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'libraries': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/link_settings.gyp b/deps/gyp/test/configurations/invalid/link_settings.gyp deleted file mode 100644 index 2f0e1c46f5..0000000000 --- a/deps/gyp/test/configurations/invalid/link_settings.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'link_settings': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/sources.gyp b/deps/gyp/test/configurations/invalid/sources.gyp deleted file mode 100644 index b38cca0381..0000000000 --- a/deps/gyp/test/configurations/invalid/sources.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'sources': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/standalone_static_library.gyp b/deps/gyp/test/configurations/invalid/standalone_static_library.gyp deleted file mode 100644 index 2edb9febd6..0000000000 --- a/deps/gyp/test/configurations/invalid/standalone_static_library.gyp +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2012 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'standalone_static_library': 1, - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/target_name.gyp b/deps/gyp/test/configurations/invalid/target_name.gyp deleted file mode 100644 index 83baad95d6..0000000000 --- a/deps/gyp/test/configurations/invalid/target_name.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'target_name': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/invalid/type.gyp b/deps/gyp/test/configurations/invalid/type.gyp deleted file mode 100644 index bc55898b89..0000000000 --- a/deps/gyp/test/configurations/invalid/type.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2010 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': 'configurations', - 'type': 'none', - 'configurations': { - 'Debug': { - 'type': [ - ], - }, - } - }, - ], -} diff --git a/deps/gyp/test/configurations/target_platform/configurations.gyp b/deps/gyp/test/configurations/target_platform/configurations.gyp deleted file mode 100644 index d15429f4e5..0000000000 --- a/deps/gyp/test/configurations/target_platform/configurations.gyp +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2009 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. - -{ - 'target_defaults': { - 'configurations': { - 'Debug_Win32': { - 'msvs_configuration_platform': 'Win32', - }, - 'Debug_x64': { - 'msvs_configuration_platform': 'x64', - }, - }, - }, - 'targets': [ - { - 'target_name': 'left', - 'type': 'static_library', - 'sources': [ - 'left.c', - ], - 'configurations': { - 'Debug_Win32': { - 'msvs_target_platform': 'x64', - }, - }, - }, - { - 'target_name': 'right', - 'type': 'static_library', - 'sources': [ - 'right.c', - ], - }, - { - 'target_name': 'front_left', - 'type': 'executable', - 'dependencies': ['left'], - 'sources': [ - 'front.c', - ], - 'configurations': { - 'Debug_Win32': { - 'msvs_target_platform': 'x64', - }, - }, - }, - { - 'target_name': 'front_right', - 'type': 'executable', - 'dependencies': ['right'], - 'sources': [ - 'front.c', - ], - }, - ], -} diff --git a/deps/gyp/test/configurations/target_platform/front.c b/deps/gyp/test/configurations/target_platform/front.c deleted file mode 100644 index 7a91689ff5..0000000000 --- a/deps/gyp/test/configurations/target_platform/front.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <stdio.h> - -const char *message(void); - -int main(void) { - printf("%s\n", message()); - return 0; -} diff --git a/deps/gyp/test/configurations/target_platform/gyptest-target_platform.py b/deps/gyp/test/configurations/target_platform/gyptest-target_platform.py deleted file mode 100755 index ae4e9e5a2d..0000000000 --- a/deps/gyp/test/configurations/target_platform/gyptest-target_platform.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 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. - -""" -Tests the msvs specific msvs_target_platform option. -""" - -import TestGyp -import TestCommon - - -def RunX64(exe, stdout): - try: - test.run_built_executable(exe, stdout=stdout) - except WindowsError, e: - # Assume the exe is 64-bit if it can't load on 32-bit systems. - # Both versions of the error are required because different versions - # of python seem to return different errors for invalid exe type. - if e.errno != 193 and '[Error 193]' not in str(e): - raise - - -test = TestGyp.TestGyp(formats=['msvs']) - -test.run_gyp('configurations.gyp') - -test.set_configuration('Debug|x64') -test.build('configurations.gyp', rebuild=True) -RunX64('front_left', stdout=('left\n')) -RunX64('front_right', stdout=('right\n')) - -test.set_configuration('Debug|Win32') -test.build('configurations.gyp', rebuild=True) -RunX64('front_left', stdout=('left\n')) -test.run_built_executable('front_right', stdout=('right\n')) - -test.pass_test() diff --git a/deps/gyp/test/configurations/target_platform/left.c b/deps/gyp/test/configurations/target_platform/left.c deleted file mode 100644 index 1ce2ea1227..0000000000 --- a/deps/gyp/test/configurations/target_platform/left.c +++ /dev/null @@ -1,3 +0,0 @@ -const char *message(void) { - return "left"; -} diff --git a/deps/gyp/test/configurations/target_platform/right.c b/deps/gyp/test/configurations/target_platform/right.c deleted file mode 100644 index b1578492fe..0000000000 --- a/deps/gyp/test/configurations/target_platform/right.c +++ /dev/null @@ -1,3 +0,0 @@ -const char *message(void) { - return "right"; -} diff --git a/deps/gyp/test/configurations/x64/configurations.c b/deps/gyp/test/configurations/x64/configurations.c deleted file mode 100644 index 37018438fc..0000000000 --- a/deps/gyp/test/configurations/x64/configurations.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> - -int main(void) { - if (sizeof(void*) == 4) { - printf("Running Win32\n"); - } else if (sizeof(void*) == 8) { - printf("Running x64\n"); - } else { - printf("Unexpected platform\n"); - } - return 0; -} diff --git a/deps/gyp/test/configurations/x64/configurations.gyp b/deps/gyp/test/configurations/x64/configurations.gyp deleted file mode 100644 index 8b0139f141..0000000000 --- a/deps/gyp/test/configurations/x64/configurations.gyp +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 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. - -{ - 'target_defaults': { - 'configurations': { - 'Debug': { - 'msvs_configuration_platform': 'Win32', - }, - 'Debug_x64': { - 'inherit_from': ['Debug'], - 'msvs_configuration_platform': 'x64', - }, - }, - }, - 'targets': [ - { - 'target_name': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - }, - { - 'target_name': 'configurations64', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - 'configurations': { - 'Debug': { - 'msvs_target_platform': 'x64', - }, - }, - }, - ], -} diff --git a/deps/gyp/test/configurations/x64/gyptest-x86.py b/deps/gyp/test/configurations/x64/gyptest-x86.py deleted file mode 100755 index 8675d8f7e7..0000000000 --- a/deps/gyp/test/configurations/x64/gyptest-x86.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2012 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. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -import sys - -formats = ['msvs'] -if sys.platform == 'win32': - formats += ['ninja'] -test = TestGyp.TestGyp(formats=formats) - -test.run_gyp('configurations.gyp') -test.set_configuration('Debug|Win32') -test.build('configurations.gyp', test.ALL) - -for machine, suffix in [('14C machine (x86)', ''), - ('8664 machine (x64)', '64')]: - output = test.run_dumpbin( - '/headers', test.built_file_path('configurations%s.exe' % suffix)) - if machine not in output: - test.fail_test() - -test.pass_test() |