diff options
Diffstat (limited to 'deps/gyp/test/builddir')
18 files changed, 0 insertions, 374 deletions
diff --git a/deps/gyp/test/builddir/gyptest-all.py b/deps/gyp/test/builddir/gyptest-all.py deleted file mode 100755 index a26543f49e..0000000000 --- a/deps/gyp/test/builddir/gyptest-all.py +++ /dev/null @@ -1,85 +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. - -""" -Verify the settings that cause a set of programs to be created in -a specific build directory, and that no intermediate built files -get created outside of that build directory hierarchy even when -referred to with deeply-nested ../../.. paths. -""" - -import TestGyp - -# TODO(mmoss): Make only supports (theoretically) a single, global build -# directory (through GYP_GENERATOR_FLAGS 'output_dir'), rather than -# gyp-file-specific settings (e.g. the stuff in builddir.gypi) that the other -# generators support, so this doesn't work yet for make. -# TODO(mmoss) Make also has the issue that the top-level Makefile is written to -# the "--depth" location, which is one level above 'src', but then this test -# moves 'src' somewhere else, leaving the Makefile behind, so make can't find -# its sources. I'm not sure if make is wrong for writing outside the current -# directory, or if the test is wrong for assuming everything generated is under -# the current directory. -# Ninja and CMake do not support setting the build directory. -test = TestGyp.TestGyp(formats=['!make', '!ninja', '!cmake']) - -test.run_gyp('prog1.gyp', '--depth=..', chdir='src') -if test.format == 'msvs': - if test.uses_msbuild: - test.must_contain('src/prog1.vcxproj', - '<OutDir>..\\builddir\\Default\\</OutDir>') - else: - test.must_contain('src/prog1.vcproj', - 'OutputDirectory="..\\builddir\\Default\\"') - -test.relocate('src', 'relocate/src') - -test.subdir('relocate/builddir') - -# Make sure that all the built ../../etc. files only get put under builddir, -# by making all of relocate read-only and then making only builddir writable. -test.writable('relocate', False) -test.writable('relocate/builddir', True) - -# Suppress the test infrastructure's setting SYMROOT on the command line. -test.build('prog1.gyp', test.ALL, SYMROOT=None, chdir='relocate/src') - -expect1 = """\ -Hello from prog1.c -Hello from func1.c -""" - -expect2 = """\ -Hello from subdir2/prog2.c -Hello from func2.c -""" - -expect3 = """\ -Hello from subdir2/subdir3/prog3.c -Hello from func3.c -""" - -expect4 = """\ -Hello from subdir2/subdir3/subdir4/prog4.c -Hello from func4.c -""" - -expect5 = """\ -Hello from subdir2/subdir3/subdir4/subdir5/prog5.c -Hello from func5.c -""" - -def run_builddir(prog, expect): - dir = 'relocate/builddir/Default/' - test.run(program=test.workpath(dir + prog), stdout=expect) - -run_builddir('prog1', expect1) -run_builddir('prog2', expect2) -run_builddir('prog3', expect3) -run_builddir('prog4', expect4) -run_builddir('prog5', expect5) - -test.pass_test() diff --git a/deps/gyp/test/builddir/gyptest-default.py b/deps/gyp/test/builddir/gyptest-default.py deleted file mode 100755 index 4904cdab42..0000000000 --- a/deps/gyp/test/builddir/gyptest-default.py +++ /dev/null @@ -1,85 +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. - -""" -Verify the settings that cause a set of programs to be created in -a specific build directory, and that no intermediate built files -get created outside of that build directory hierarchy even when -referred to with deeply-nested ../../.. paths. -""" - -import TestGyp - -# TODO(mmoss): Make only supports (theoretically) a single, global build -# directory (through GYP_GENERATOR_FLAGS 'output_dir'), rather than -# gyp-file-specific settings (e.g. the stuff in builddir.gypi) that the other -# generators support, so this doesn't work yet for make. -# TODO(mmoss) Make also has the issue that the top-level Makefile is written to -# the "--depth" location, which is one level above 'src', but then this test -# moves 'src' somewhere else, leaving the Makefile behind, so make can't find -# its sources. I'm not sure if make is wrong for writing outside the current -# directory, or if the test is wrong for assuming everything generated is under -# the current directory. -# Ninja and CMake do not support setting the build directory. -test = TestGyp.TestGyp(formats=['!make', '!ninja', '!cmake']) - -test.run_gyp('prog1.gyp', '--depth=..', chdir='src') -if test.format == 'msvs': - if test.uses_msbuild: - test.must_contain('src/prog1.vcxproj', - '<OutDir>..\\builddir\\Default\\</OutDir>') - else: - test.must_contain('src/prog1.vcproj', - 'OutputDirectory="..\\builddir\\Default\\"') - -test.relocate('src', 'relocate/src') - -test.subdir('relocate/builddir') - -# Make sure that all the built ../../etc. files only get put under builddir, -# by making all of relocate read-only and then making only builddir writable. -test.writable('relocate', False) -test.writable('relocate/builddir', True) - -# Suppress the test infrastructure's setting SYMROOT on the command line. -test.build('prog1.gyp', SYMROOT=None, chdir='relocate/src') - -expect1 = """\ -Hello from prog1.c -Hello from func1.c -""" - -expect2 = """\ -Hello from subdir2/prog2.c -Hello from func2.c -""" - -expect3 = """\ -Hello from subdir2/subdir3/prog3.c -Hello from func3.c -""" - -expect4 = """\ -Hello from subdir2/subdir3/subdir4/prog4.c -Hello from func4.c -""" - -expect5 = """\ -Hello from subdir2/subdir3/subdir4/subdir5/prog5.c -Hello from func5.c -""" - -def run_builddir(prog, expect): - dir = 'relocate/builddir/Default/' - test.run(program=test.workpath(dir + prog), stdout=expect) - -run_builddir('prog1', expect1) -run_builddir('prog2', expect2) -run_builddir('prog3', expect3) -run_builddir('prog4', expect4) -run_builddir('prog5', expect5) - -test.pass_test() diff --git a/deps/gyp/test/builddir/src/builddir.gypi b/deps/gyp/test/builddir/src/builddir.gypi deleted file mode 100644 index ce175db8f8..0000000000 --- a/deps/gyp/test/builddir/src/builddir.gypi +++ /dev/null @@ -1,18 +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': { - 'Default': { - 'msvs_configuration_attributes': { - 'OutputDirectory': '<(DEPTH)\\builddir/Default', - }, - }, - }, - }, - 'xcode_settings': { - 'SYMROOT': '<(DEPTH)/builddir', - }, -} diff --git a/deps/gyp/test/builddir/src/func1.c b/deps/gyp/test/builddir/src/func1.c deleted file mode 100644 index b8e6a06951..0000000000 --- a/deps/gyp/test/builddir/src/func1.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -void func1(void) -{ - printf("Hello from func1.c\n"); -} diff --git a/deps/gyp/test/builddir/src/func2.c b/deps/gyp/test/builddir/src/func2.c deleted file mode 100644 index 14aabac475..0000000000 --- a/deps/gyp/test/builddir/src/func2.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -void func2(void) -{ - printf("Hello from func2.c\n"); -} diff --git a/deps/gyp/test/builddir/src/func3.c b/deps/gyp/test/builddir/src/func3.c deleted file mode 100644 index 3b4edeae6d..0000000000 --- a/deps/gyp/test/builddir/src/func3.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -void func3(void) -{ - printf("Hello from func3.c\n"); -} diff --git a/deps/gyp/test/builddir/src/func4.c b/deps/gyp/test/builddir/src/func4.c deleted file mode 100644 index 732891b79a..0000000000 --- a/deps/gyp/test/builddir/src/func4.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -void func4(void) -{ - printf("Hello from func4.c\n"); -} diff --git a/deps/gyp/test/builddir/src/func5.c b/deps/gyp/test/builddir/src/func5.c deleted file mode 100644 index 18fdfabbbe..0000000000 --- a/deps/gyp/test/builddir/src/func5.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -void func5(void) -{ - printf("Hello from func5.c\n"); -} diff --git a/deps/gyp/test/builddir/src/prog1.c b/deps/gyp/test/builddir/src/prog1.c deleted file mode 100644 index a32aaf04f9..0000000000 --- a/deps/gyp/test/builddir/src/prog1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -extern void func1(void); - -int main(void) -{ - printf("Hello from prog1.c\n"); - func1(); - return 0; -} diff --git a/deps/gyp/test/builddir/src/prog1.gyp b/deps/gyp/test/builddir/src/prog1.gyp deleted file mode 100644 index 5b96f035ec..0000000000 --- a/deps/gyp/test/builddir/src/prog1.gyp +++ /dev/null @@ -1,30 +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. - -{ - 'includes': [ - 'builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'pull_in_all', - 'type': 'none', - 'dependencies': [ - 'prog1', - 'subdir2/prog2.gyp:prog2', - 'subdir2/subdir3/prog3.gyp:prog3', - 'subdir2/subdir3/subdir4/prog4.gyp:prog4', - 'subdir2/subdir3/subdir4/subdir5/prog5.gyp:prog5', - ], - }, - { - 'target_name': 'prog1', - 'type': 'executable', - 'sources': [ - 'prog1.c', - 'func1.c', - ], - }, - ], -} diff --git a/deps/gyp/test/builddir/src/subdir2/prog2.c b/deps/gyp/test/builddir/src/subdir2/prog2.c deleted file mode 100644 index 9d682cd783..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/prog2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -extern void func2(void); - -int main(void) -{ - printf("Hello from subdir2/prog2.c\n"); - func2(); - return 0; -} diff --git a/deps/gyp/test/builddir/src/subdir2/prog2.gyp b/deps/gyp/test/builddir/src/subdir2/prog2.gyp deleted file mode 100644 index 96299b646d..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/prog2.gyp +++ /dev/null @@ -1,19 +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. - -{ - 'includes': [ - '../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog2', - 'type': 'executable', - 'sources': [ - 'prog2.c', - '../func2.c', - ], - }, - ], -} diff --git a/deps/gyp/test/builddir/src/subdir2/subdir3/prog3.c b/deps/gyp/test/builddir/src/subdir2/subdir3/prog3.c deleted file mode 100644 index da74965985..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/subdir3/prog3.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -extern void func3(void); - -int main(void) -{ - printf("Hello from subdir2/subdir3/prog3.c\n"); - func3(); - return 0; -} diff --git a/deps/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp b/deps/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp deleted file mode 100644 index d7df43c7bd..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp +++ /dev/null @@ -1,19 +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. - -{ - 'includes': [ - '../../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog3', - 'type': 'executable', - 'sources': [ - 'prog3.c', - '../../func3.c', - ], - }, - ], -} diff --git a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c b/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c deleted file mode 100644 index 5787d5fa43..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -extern void func4(void); - -int main(void) -{ - printf("Hello from subdir2/subdir3/subdir4/prog4.c\n"); - func4(); - return 0; -} diff --git a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp b/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp deleted file mode 100644 index 862a8a18cd..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp +++ /dev/null @@ -1,19 +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. - -{ - 'includes': [ - '../../../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog4', - 'type': 'executable', - 'sources': [ - 'prog4.c', - '../../../func4.c', - ], - }, - ], -} diff --git a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c b/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c deleted file mode 100644 index c6e2ab521f..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> - -extern void func5(void); - -int main(void) -{ - printf("Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\n"); - func5(); - return 0; -} diff --git a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp b/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp deleted file mode 100644 index fe1c9cbf50..0000000000 --- a/deps/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp +++ /dev/null @@ -1,19 +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. - -{ - 'includes': [ - '../../../../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog5', - 'type': 'executable', - 'sources': [ - 'prog5.c', - '../../../../func5.c', - ], - }, - ], -} |