summaryrefslogtreecommitdiff
path: root/deps/gyp/test/ninja
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/ninja')
-rw-r--r--deps/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py32
-rw-r--r--deps/gyp/test/ninja/action-rule-hash/subdir/action-rule-hash.gyp29
-rw-r--r--deps/gyp/test/ninja/action-rule-hash/subdir/emit.py13
-rwxr-xr-xdeps/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py62
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/a.c10
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/a.h13
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp88
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/b.c18
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/b.h13
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/c.c10
-rw-r--r--deps/gyp/test/ninja/action_dependencies/src/c.h13
-rwxr-xr-xdeps/gyp/test/ninja/action_dependencies/src/emit.py11
-rw-r--r--deps/gyp/test/ninja/chained-dependency/chained-dependency.gyp53
-rw-r--r--deps/gyp/test/ninja/chained-dependency/chained.c5
-rwxr-xr-xdeps/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py30
-rw-r--r--deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/gyptest-empty-and-non-empty-duplicate-name.py23
-rw-r--r--deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/subdir/included.gyp19
-rw-r--r--deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/test.gyp19
-rw-r--r--deps/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py46
-rw-r--r--deps/gyp/test/ninja/normalize-paths-win/hello.cc7
-rw-r--r--deps/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp68
-rw-r--r--deps/gyp/test/ninja/s-needs-no-depfiles/empty.s1
-rwxr-xr-xdeps/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py42
-rw-r--r--deps/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp13
-rwxr-xr-xdeps/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py46
-rw-r--r--deps/gyp/test/ninja/solibs_avoid_relinking/main.cc5
-rw-r--r--deps/gyp/test/ninja/solibs_avoid_relinking/solib.cc8
-rw-r--r--deps/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp38
-rw-r--r--deps/gyp/test/ninja/use-console/foo.bar5
-rw-r--r--deps/gyp/test/ninja/use-console/gyptest-use-console.py29
-rw-r--r--deps/gyp/test/ninja/use-console/use-console.gyp60
-rw-r--r--deps/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py28
-rw-r--r--deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc7
-rw-r--r--deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp15
34 files changed, 0 insertions, 879 deletions
diff --git a/deps/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py b/deps/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py
deleted file mode 100644
index 7147fd2fc3..0000000000
--- a/deps/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 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.
-
-"""
-Verify that running gyp in a different directory does not cause actions and
-rules to rerun.
-"""
-
-import os
-import sys
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['ninja'])
-# The xcode-ninja generator handles gypfiles which are not at the
-# project root incorrectly.
-# cf. https://code.google.com/p/gyp/issues/detail?id=460
-if test.format == 'xcode-ninja':
- test.skip_test()
-
-test.run_gyp('subdir/action-rule-hash.gyp')
-test.build('subdir/action-rule-hash.gyp', test.ALL)
-test.up_to_date('subdir/action-rule-hash.gyp')
-
-# Verify that everything is still up-to-date when we re-invoke gyp from a
-# different directory.
-test.run_gyp('action-rule-hash.gyp', '--depth=../', chdir='subdir')
-test.up_to_date('subdir/action-rule-hash.gyp')
-
-test.pass_test()
diff --git a/deps/gyp/test/ninja/action-rule-hash/subdir/action-rule-hash.gyp b/deps/gyp/test/ninja/action-rule-hash/subdir/action-rule-hash.gyp
deleted file mode 100644
index 0e88a3019f..0000000000
--- a/deps/gyp/test/ninja/action-rule-hash/subdir/action-rule-hash.gyp
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 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': 'program',
- 'type': 'executable',
- 'sources': [
- '<(INTERMEDIATE_DIR)/main.cc',
- ],
- 'actions': [
- {
- 'action_name': 'emit_main_cc',
- 'inputs': ['emit.py'],
- 'outputs': ['<(INTERMEDIATE_DIR)/main.cc'],
- 'action': [
- 'python',
- 'emit.py',
- '<(INTERMEDIATE_DIR)/main.cc',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/action-rule-hash/subdir/emit.py b/deps/gyp/test/ninja/action-rule-hash/subdir/emit.py
deleted file mode 100644
index fcb715a9fa..0000000000
--- a/deps/gyp/test/ninja/action-rule-hash/subdir/emit.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 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.
-
-import sys
-
-f = open(sys.argv[1], 'wb')
-f.write('int main() {\n')
-f.write(' return 0;\n')
-f.write('}\n')
-f.close()
diff --git a/deps/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py b/deps/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py
deleted file mode 100755
index cb59d7e3c1..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py
+++ /dev/null
@@ -1,62 +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 that building an object file correctly depends on running actions in
-dependent targets, but not the targets themselves.
-"""
-
-import os
-import sys
-
-if sys.platform == 'win32':
- print "This test is currently disabled: https://crbug.com/483696."
- sys.exit(0)
-
-
-import TestGyp
-
-# NOTE(piman): This test will not work with other generators because:
-# - it explicitly tests the optimization, which is not implemented (yet?) on
-# other generators
-# - it relies on the exact path to output object files, which is generator
-# dependent, and actually, relies on the ability to build only that object file,
-# which I don't think is available on all generators.
-# TODO(piman): Extend to other generators when possible.
-test = TestGyp.TestGyp(formats=['ninja'])
-# xcode-ninja doesn't support building single object files by design.
-if test.format == 'xcode-ninja':
- test.skip_test()
-
-test.run_gyp('action_dependencies.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-objext = '.obj' if sys.platform == 'win32' else '.o'
-
-test.build('action_dependencies.gyp',
- os.path.join('obj', 'b.b' + objext),
- chdir=chdir)
-
-# The 'a' actions should be run (letting b.c compile), but the a static library
-# should not be built.
-test.built_file_must_not_exist('a', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist(os.path.join('obj', 'b.b' + objext), chdir=chdir)
-
-test.build('action_dependencies.gyp',
- os.path.join('obj', 'c.c' + objext),
- chdir=chdir)
-
-# 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c
-# compile
-test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir)
-test.built_file_must_exist(os.path.join('obj', 'c.c' + objext), chdir=chdir)
-
-
-test.pass_test()
diff --git a/deps/gyp/test/ninja/action_dependencies/src/a.c b/deps/gyp/test/ninja/action_dependencies/src/a.c
deleted file mode 100644
index 4d7af9b26c..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/a.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-#include "a.h"
-
-int funcA() {
- return 42;
-}
diff --git a/deps/gyp/test/ninja/action_dependencies/src/a.h b/deps/gyp/test/ninja/action_dependencies/src/a.h
deleted file mode 100644
index 335db56739..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/a.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-#ifndef A_H_
-#define A_H_
-
-#include "a/generated.h"
-
-int funcA();
-
-#endif // A_H_
diff --git a/deps/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp b/deps/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp
deleted file mode 100644
index 5baa7a7d47..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright (c) 2011 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': 'a',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- 'a.h',
- ],
- 'actions': [
- {
- 'action_name': 'generate_headers',
- 'inputs': [
- 'emit.py'
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/a/generated.h'
- ],
- 'action': [
- 'python',
- 'emit.py',
- '<(SHARED_INTERMEDIATE_DIR)/a/generated.h',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
- {
- 'target_name': 'b',
- 'type': 'executable',
- 'sources': [
- 'b.c',
- 'b.h',
- ],
- 'dependencies': [
- 'a',
- ],
- },
- {
- 'target_name': 'c',
- 'type': 'static_library',
- 'sources': [
- 'c.c',
- 'c.h',
- ],
- 'dependencies': [
- 'b',
- ],
- 'actions': [
- {
- 'action_name': 'generate_headers',
- 'inputs': [
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/c/generated.h'
- ],
- 'action': [
- '<(PRODUCT_DIR)/b',
- '<(SHARED_INTERMEDIATE_DIR)/c/generated.h',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/action_dependencies/src/b.c b/deps/gyp/test/ninja/action_dependencies/src/b.c
deleted file mode 100644
index 824464695a..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/b.c
+++ /dev/null
@@ -1,18 +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.
- */
-
-#include <stdio.h>
-
-#include "b.h"
-
-int main(int argc, char** argv) {
- FILE* f;
- if (argc < 2)
- return 1;
- f = fopen(argv[1], "wt");
- fprintf(f, "#define VALUE %d\n", funcA());
- fclose(f);
- return 0;
-}
diff --git a/deps/gyp/test/ninja/action_dependencies/src/b.h b/deps/gyp/test/ninja/action_dependencies/src/b.h
deleted file mode 100644
index 91362cd899..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/b.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-#ifndef B_H_
-#define B_H_
-
-#include "a.h"
-
-int funcB();
-
-#endif // B_H_
diff --git a/deps/gyp/test/ninja/action_dependencies/src/c.c b/deps/gyp/test/ninja/action_dependencies/src/c.c
deleted file mode 100644
index b412087ec8..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/c.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-#include "c.h"
-
-int funcC() {
- return VALUE;
-}
diff --git a/deps/gyp/test/ninja/action_dependencies/src/c.h b/deps/gyp/test/ninja/action_dependencies/src/c.h
deleted file mode 100644
index c81a45bbe7..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/c.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-#ifndef C_H_
-#define C_H_
-
-#include "c/generated.h"
-
-int funcC();
-
-#endif // C_H_
diff --git a/deps/gyp/test/ninja/action_dependencies/src/emit.py b/deps/gyp/test/ninja/action_dependencies/src/emit.py
deleted file mode 100755
index 2df74b79a1..0000000000
--- a/deps/gyp/test/ninja/action_dependencies/src/emit.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2011 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.
-
-import sys
-
-f = open(sys.argv[1], 'wb')
-f.write('/* Hello World */\n')
-f.close()
diff --git a/deps/gyp/test/ninja/chained-dependency/chained-dependency.gyp b/deps/gyp/test/ninja/chained-dependency/chained-dependency.gyp
deleted file mode 100644
index 3fe68ae85a..0000000000
--- a/deps/gyp/test/ninja/chained-dependency/chained-dependency.gyp
+++ /dev/null
@@ -1,53 +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': [
- # This first target generates a header.
- {
- 'target_name': 'generate_header',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'action_name': 'generate header',
- 'inputs': [],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/generated/header.h'],
- 'action': [
- 'python', '-c', 'open(<(_outputs), "w")'
- ]
- },
- ],
- 'all_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
-
- # This intermediate target does nothing other than pull in a
- # dependency on the above generated target.
- {
- 'target_name': 'chain',
- 'type': 'none',
- 'dependencies': [
- 'generate_header',
- ],
- },
-
- # This final target is:
- # - a static library (so gyp doesn't transitively pull in dependencies);
- # - that relies on the generated file two dependencies away.
- {
- 'target_name': 'chained',
- 'type': 'static_library',
- 'dependencies': [
- 'chain',
- ],
- 'sources': [
- 'chained.c',
- ],
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/chained-dependency/chained.c b/deps/gyp/test/ninja/chained-dependency/chained.c
deleted file mode 100644
index c1ff1a7b12..0000000000
--- a/deps/gyp/test/ninja/chained-dependency/chained.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "generated/header.h"
-
-int main(void) {
- return 0;
-}
diff --git a/deps/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py b/deps/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py
deleted file mode 100755
index d8763f1d3d..0000000000
--- a/deps/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py
+++ /dev/null
@@ -1,30 +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 that files generated by two-steps-removed actions are built before
-dependent compile steps.
-"""
-
-import os
-import sys
-import TestGyp
-
-# This test is Ninja-specific in that:
-# - the bug only showed nondeterministically in parallel builds;
-# - it relies on a ninja-specific output file path.
-
-test = TestGyp.TestGyp(formats=['ninja'])
-# xcode-ninja doesn't support building single object files by design.
-if test.format == 'xcode-ninja':
- test.skip_test()
-
-test.run_gyp('chained-dependency.gyp')
-objext = '.obj' if sys.platform == 'win32' else '.o'
-test.build('chained-dependency.gyp',
- os.path.join('obj', 'chained.chained' + objext))
-# The test passes if the .o file builds successfully.
-test.pass_test()
diff --git a/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/gyptest-empty-and-non-empty-duplicate-name.py b/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/gyptest-empty-and-non-empty-duplicate-name.py
deleted file mode 100644
index 0bdca66cdc..0000000000
--- a/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/gyptest-empty-and-non-empty-duplicate-name.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 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 a phony target isn't output if a target exists with the same name that
-was output.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['ninja'])
-
-# Reset xcode_ninja_target_pattern to its default for this test.
-test.run_gyp('test.gyp', '-G', 'xcode_ninja_target_pattern=^$')
-
-# Check for both \r and \n to cover both windows and linux.
-test.must_not_contain('out/Default/build.ninja', 'build empty_target: phony\r')
-test.must_not_contain('out/Default/build.ninja', 'build empty_target: phony\n')
-
-test.pass_test()
diff --git a/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/subdir/included.gyp b/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/subdir/included.gyp
deleted file mode 100644
index 1b9fc42f3f..0000000000
--- a/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/subdir/included.gyp
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 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': 'empty_target',
- 'type': 'executable',
- 'sources': [
- 'test.cc',
- ],
- },
- {
- 'target_name': 'included_empty_target',
- 'type': 'none',
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/test.gyp b/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/test.gyp
deleted file mode 100644
index 9aa6287c7c..0000000000
--- a/deps/gyp/test/ninja/empty-and-non-empty-duplicate-name/test.gyp
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 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': 'All',
- 'type': 'none',
- 'dependencies': [
- 'subdir/included.gyp:included_empty_target'
- ]
- },
- {
- 'target_name': 'empty_target',
- 'type': 'none',
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py b/deps/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py
deleted file mode 100644
index f56dbe5921..0000000000
--- a/deps/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py
+++ /dev/null
@@ -1,46 +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.
-
-"""
-Make sure paths are normalized with VS macros properly expanded on Windows.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- test.run_gyp('normalize-paths.gyp')
-
- # We can't use existence tests because any case will pass, so we check the
- # contents of ninja files directly since that's what we're most concerned
- # with anyway.
- subninja = open(test.built_file_path('obj/some_target.ninja')).read()
- if '$!product_dir' in subninja:
- test.fail_test()
- if 'out\\Default' in subninja:
- test.fail_test()
-
- second = open(test.built_file_path('obj/second.ninja')).read()
- if ('..\\..\\things\\AnotherName.exe' in second or
- 'AnotherName.exe' not in second):
- test.fail_test()
-
- copytarget = open(test.built_file_path('obj/copy_target.ninja')).read()
- if '$(VSInstallDir)' in copytarget:
- test.fail_test()
-
- action = open(test.built_file_path('obj/action.ninja')).read()
- if '..\\..\\out\\Default' in action:
- test.fail_test()
- if '..\\..\\SomethingElse' in action or 'SomethingElse' not in action:
- test.fail_test()
- if '..\\..\\SomeOtherInput' in action or 'SomeOtherInput' not in action:
- test.fail_test()
-
- test.pass_test()
diff --git a/deps/gyp/test/ninja/normalize-paths-win/hello.cc b/deps/gyp/test/ninja/normalize-paths-win/hello.cc
deleted file mode 100644
index 1711567ef5..0000000000
--- a/deps/gyp/test/ninja/normalize-paths-win/hello.cc
+++ /dev/null
@@ -1,7 +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.
-
-int main() {
- return 0;
-}
diff --git a/deps/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp b/deps/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp
deleted file mode 100644
index 544d06456d..0000000000
--- a/deps/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp
+++ /dev/null
@@ -1,68 +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': 'Some_Target',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '<(PRODUCT_DIR)/stuff/AnotherName.exe',
- },
- },
- 'sources': [
- 'HeLLo.cc',
- 'blOrP.idl',
- ],
- },
- {
- 'target_name': 'second',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\things\\AnotherName.exe',
- },
- },
- 'sources': [
- 'HeLLo.cc',
- ],
- },
- {
- 'target_name': 'Copy_Target',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- '$(VSInstallDir)\\bin\\cl.exe',
- ],
- },
- ],
- },
- {
- 'target_name': 'action',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'inputs': [
- '$(IntDir)\\SomeInput',
- '$(OutDir)\\SomeOtherInput',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/ReSuLt',
- '<(SHARED_INTERMEDIATE_DIR)/TempFile',
- '$(OutDir)\SomethingElse',
- ],
- 'action_name': 'Test action',
- # Unfortunately, we can't normalize this field because it's
- # free-form. Fortunately, ninja doesn't inspect it at all (only the
- # inputs and outputs) so it's not mandatory.
- 'action': [],
- },
- ],
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/s-needs-no-depfiles/empty.s b/deps/gyp/test/ninja/s-needs-no-depfiles/empty.s
deleted file mode 100644
index 218d8921e5..0000000000
--- a/deps/gyp/test/ninja/s-needs-no-depfiles/empty.s
+++ /dev/null
@@ -1 +0,0 @@
-# This file intentionally left blank.
diff --git a/deps/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py b/deps/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
deleted file mode 100755
index 77a3245d46..0000000000
--- a/deps/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
+++ /dev/null
@@ -1,42 +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 that .s files don't always trigger a rebuild, as would happen if depfiles
-were used for them (since clang & gcc ignore -MMD when building .s->.o on
-linux).
-"""
-
-import os
-import sys
-import TestCommon
-import TestGyp
-
-# NOTE(fischman): Each generator uses depfiles (or not) differently, so this is
-# a ninja-specific test.
-test = TestGyp.TestGyp(formats=['ninja'])
-
-if sys.platform == 'win32' or sys.platform == 'win64':
- # This test is about clang/gcc vs. depfiles; VS gets a pass.
- test.pass_test()
- sys.exit(0)
-
-test.run_gyp('s-needs-no-depfiles.gyp')
-
-# Build the library, grab its timestamp, rebuild the library, ensure timestamp
-# hasn't changed.
-test.build('s-needs-no-depfiles.gyp', 'empty')
-empty_dll = test.built_file_path('empty', test.SHARED_LIB)
-test.built_file_must_exist(empty_dll)
-pre_stat = os.stat(test.built_file_path(empty_dll))
-test.sleep()
-test.build('s-needs-no-depfiles.gyp', 'empty')
-post_stat = os.stat(test.built_file_path(empty_dll))
-
-if pre_stat.st_mtime != post_stat.st_mtime:
- test.fail_test()
-else:
- test.pass_test()
diff --git a/deps/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp b/deps/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp
deleted file mode 100644
index bd66b1a70a..0000000000
--- a/deps/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp
+++ /dev/null
@@ -1,13 +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': 'empty',
- 'type': 'shared_library',
- 'sources': [ 'empty.s' ],
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py b/deps/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py
deleted file mode 100755
index 1b8e812eb2..0000000000
--- a/deps/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py
+++ /dev/null
@@ -1,46 +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 that relinking a solib doesn't relink a dependent executable if the
-solib's public API hasn't changed.
-"""
-
-import os
-import sys
-import TestCommon
-import TestGyp
-
-# NOTE(fischman): This test will not work with other generators because the
-# API-hash-based-mtime-preservation optimization is only implemented in
-# ninja.py. It could be extended to the make.py generator as well pretty
-# easily, probably.
-# (also, it tests ninja-specific out paths, which would have to be generalized
-# if this was extended to other generators).
-test = TestGyp.TestGyp(formats=['ninja'])
-
-if not os.environ.get('ProgramFiles(x86)'):
- # TODO(scottmg)
- print 'Skipping test on x86, http://crbug.com/365833'
- test.pass_test()
-
-test.run_gyp('solibs_avoid_relinking.gyp')
-
-# Build the executable, grab its timestamp, touch the solib's source, rebuild
-# executable, ensure timestamp hasn't changed.
-test.build('solibs_avoid_relinking.gyp', 'b')
-test.built_file_must_exist('b' + TestCommon.exe_suffix)
-pre_stat = os.stat(test.built_file_path('b' + TestCommon.exe_suffix))
-os.utime(os.path.join(test.workdir, 'solib.cc'),
- (pre_stat.st_atime, pre_stat.st_mtime + 100))
-test.sleep()
-test.build('solibs_avoid_relinking.gyp', 'b')
-post_stat = os.stat(test.built_file_path('b' + TestCommon.exe_suffix))
-
-if pre_stat.st_mtime != post_stat.st_mtime:
- test.fail_test()
-else:
- test.pass_test()
diff --git a/deps/gyp/test/ninja/solibs_avoid_relinking/main.cc b/deps/gyp/test/ninja/solibs_avoid_relinking/main.cc
deleted file mode 100644
index 2cd74d3c77..0000000000
--- a/deps/gyp/test/ninja/solibs_avoid_relinking/main.cc
+++ /dev/null
@@ -1,5 +0,0 @@
-extern int foo();
-
-int main() {
- return foo();
-}
diff --git a/deps/gyp/test/ninja/solibs_avoid_relinking/solib.cc b/deps/gyp/test/ninja/solibs_avoid_relinking/solib.cc
deleted file mode 100644
index 0856cd4e00..0000000000
--- a/deps/gyp/test/ninja/solibs_avoid_relinking/solib.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifdef _MSC_VER
-__declspec(dllexport)
-#else
-__attribute__((visibility("default")))
-#endif
-int foo() {
- return 42;
-}
diff --git a/deps/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp b/deps/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp
deleted file mode 100644
index e816351d68..0000000000
--- a/deps/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp
+++ /dev/null
@@ -1,38 +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': 'a',
- 'type': 'shared_library',
- 'sources': [ 'solib.cc' ],
- # Incremental linking enabled so that .lib timestamp is maintained when
- # exports are unchanged.
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '2',
- }
- },
- },
- {
- 'target_name': 'b',
- 'type': 'executable',
- 'sources': [ 'main.cc' ],
- 'dependencies': [ 'a' ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '2',
- }
- },
- },
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'target_defaults': {
- 'cflags': ['-fPIC'],
- },
- }],
- ],
-}
diff --git a/deps/gyp/test/ninja/use-console/foo.bar b/deps/gyp/test/ninja/use-console/foo.bar
deleted file mode 100644
index 07c476a866..0000000000
--- a/deps/gyp/test/ninja/use-console/foo.bar
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright (c) 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.
-
-This is a dummy file for rule/action input.
diff --git a/deps/gyp/test/ninja/use-console/gyptest-use-console.py b/deps/gyp/test/ninja/use-console/gyptest-use-console.py
deleted file mode 100644
index f76fcd9829..0000000000
--- a/deps/gyp/test/ninja/use-console/gyptest-use-console.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 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.
-
-"""
-Make sure 'ninja_use_console' is supported in actions and rules.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['ninja'])
-
-test.run_gyp('use-console.gyp')
-
-no_pool = open(test.built_file_path('obj/no_pool.ninja')).read()
-if 'pool =' in no_pool:
- test.fail_test()
-
-action_pool = open(test.built_file_path('obj/action_pool.ninja')).read()
-if 'pool = console' not in action_pool:
- test.fail_test()
-
-rule_pool = open(test.built_file_path('obj/rule_pool.ninja')).read()
-if 'pool = console' not in rule_pool:
- test.fail_test()
-
-test.pass_test()
diff --git a/deps/gyp/test/ninja/use-console/use-console.gyp b/deps/gyp/test/ninja/use-console/use-console.gyp
deleted file mode 100644
index 84e63184c6..0000000000
--- a/deps/gyp/test/ninja/use-console/use-console.gyp
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (c) 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': 'no_pool',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'some_action',
- 'action': ['echo', 'hello'],
- 'inputs': ['foo.bar'],
- 'outputs': ['dummy'],
- },
- ],
- 'rules': [
- {
- 'rule_name': 'some_rule',
- 'extension': 'bar',
- 'action': ['echo', 'hello'],
- 'outputs': ['dummy'],
- },
- ],
- 'sources': [
- 'foo.bar',
- ],
- },
- {
- 'target_name': 'action_pool',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'some_action',
- 'action': ['echo', 'hello'],
- 'inputs': ['foo.bar'],
- 'outputs': ['dummy'],
- 'ninja_use_console': 1,
- },
- ],
- },
- {
- 'target_name': 'rule_pool',
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'some_rule',
- 'extension': 'bar',
- 'action': ['echo', 'hello'],
- 'outputs': ['dummy'],
- 'ninja_use_console': 1,
- },
- ],
- 'sources': [
- 'foo.bar',
- ],
- },
- ],
-}
diff --git a/deps/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py b/deps/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py
deleted file mode 100644
index 0c44b1d1c9..0000000000
--- a/deps/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py
+++ /dev/null
@@ -1,28 +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.
-
-"""
-Make sure environment files can be suppressed.
-"""
-
-import TestGyp
-
-import os
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- test.run_gyp('use-custom-environment-files.gyp',
- '-G', 'ninja_use_custom_environment_files')
-
- # Make sure environment files do not exist.
- if os.path.exists(test.built_file_path('environment.x86')):
- test.fail_test()
- if os.path.exists(test.built_file_path('environment.x64')):
- test.fail_test()
-
- test.pass_test()
diff --git a/deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc b/deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc
deleted file mode 100644
index 1711567ef5..0000000000
--- a/deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc
+++ /dev/null
@@ -1,7 +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.
-
-int main() {
- return 0;
-}
diff --git a/deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp b/deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp
deleted file mode 100644
index dbc95a9439..0000000000
--- a/deps/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp
+++ /dev/null
@@ -1,15 +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': 'test_use_custom_environment_files',
- 'type': 'executable',
- 'sources': [
- 'use-custom-environment-files.cc',
- ],
- },
- ],
-}