diff options
Diffstat (limited to 'deps/gyp/test/ninja/action_dependencies')
9 files changed, 0 insertions, 238 deletions
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() |