summaryrefslogtreecommitdiff
path: root/deps/gyp/test/hard_dependency
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/hard_dependency')
-rwxr-xr-xdeps/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py37
-rwxr-xr-xdeps/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py36
-rw-r--r--deps/gyp/test/hard_dependency/src/a.c9
-rw-r--r--deps/gyp/test/hard_dependency/src/a.h12
-rw-r--r--deps/gyp/test/hard_dependency/src/b.c9
-rw-r--r--deps/gyp/test/hard_dependency/src/b.h12
-rw-r--r--deps/gyp/test/hard_dependency/src/c.c10
-rw-r--r--deps/gyp/test/hard_dependency/src/c.h10
-rw-r--r--deps/gyp/test/hard_dependency/src/d.c9
-rwxr-xr-xdeps/gyp/test/hard_dependency/src/emit.py11
-rw-r--r--deps/gyp/test/hard_dependency/src/hard_dependency.gyp78
11 files changed, 0 insertions, 233 deletions
diff --git a/deps/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py b/deps/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py
deleted file mode 100755
index ba51528800..0000000000
--- a/deps/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py
+++ /dev/null
@@ -1,37 +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.
-
-"""
-Verify that a hard_dependency that is exported is pulled in as a dependency
-for a target if the target is a static library and if the generator will
-remove dependencies between static libraries.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-if test.format == 'dump_dependency_json':
- test.skip_test('Skipping test; dependency JSON does not adjust ' \
- 'static libraries.\n')
-
-test.run_gyp('hard_dependency.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-test.build('hard_dependency.gyp', 'c', chdir=chdir)
-
-# The 'a' static library should be built, as it has actions with side-effects
-# that are necessary to compile 'c'. Even though 'c' does not directly depend
-# on 'a', because 'a' is a hard_dependency that 'b' exports, 'c' should import
-# it as a hard_dependency and ensure it is built before building 'c'.
-test.built_file_must_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('c', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('d', type=test.STATIC_LIB, chdir=chdir)
-
-test.pass_test()
diff --git a/deps/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py b/deps/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py
deleted file mode 100755
index 10774ca2a0..0000000000
--- a/deps/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py
+++ /dev/null
@@ -1,36 +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.
-
-"""
-Verify that a hard_dependency that is not exported is not pulled in as a
-dependency for a target if the target does not explicitly specify a dependency
-and none of its dependencies export the hard_dependency.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-if test.format == 'dump_dependency_json':
- test.skip_test('Skipping test; dependency JSON does not adjust ' \
- 'static libaries.\n')
-
-test.run_gyp('hard_dependency.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-test.build('hard_dependency.gyp', 'd', chdir=chdir)
-
-# Because 'c' does not export a hard_dependency, only the target 'd' should
-# be built. This is because the 'd' target does not need the generated headers
-# in order to be compiled.
-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_not_exist('c', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist('d', type=test.STATIC_LIB, chdir=chdir)
-
-test.pass_test()
diff --git a/deps/gyp/test/hard_dependency/src/a.c b/deps/gyp/test/hard_dependency/src/a.c
deleted file mode 100644
index 0fa0223c97..0000000000
--- a/deps/gyp/test/hard_dependency/src/a.c
+++ /dev/null
@@ -1,9 +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/hard_dependency/src/a.h b/deps/gyp/test/hard_dependency/src/a.h
deleted file mode 100644
index 854a06504a..0000000000
--- a/deps/gyp/test/hard_dependency/src/a.h
+++ /dev/null
@@ -1,12 +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. */
-
-#ifndef A_H_
-#define A_H_
-
-#include "generated.h"
-
-int funcA();
-
-#endif // A_H_
diff --git a/deps/gyp/test/hard_dependency/src/b.c b/deps/gyp/test/hard_dependency/src/b.c
deleted file mode 100644
index 0baace929e..0000000000
--- a/deps/gyp/test/hard_dependency/src/b.c
+++ /dev/null
@@ -1,9 +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 funcB() {
- return funcA();
-}
diff --git a/deps/gyp/test/hard_dependency/src/b.h b/deps/gyp/test/hard_dependency/src/b.h
deleted file mode 100644
index 22b48cefe2..0000000000
--- a/deps/gyp/test/hard_dependency/src/b.h
+++ /dev/null
@@ -1,12 +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/hard_dependency/src/c.c b/deps/gyp/test/hard_dependency/src/c.c
deleted file mode 100644
index 7d0068208e..0000000000
--- a/deps/gyp/test/hard_dependency/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 "b.h"
-#include "c.h"
-
-int funcC() {
- return funcB();
-}
diff --git a/deps/gyp/test/hard_dependency/src/c.h b/deps/gyp/test/hard_dependency/src/c.h
deleted file mode 100644
index f4ea7fefa2..0000000000
--- a/deps/gyp/test/hard_dependency/src/c.h
+++ /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. */
-
-#ifndef C_H_
-#define C_H_
-
-int funcC();
-
-#endif // C_H_
diff --git a/deps/gyp/test/hard_dependency/src/d.c b/deps/gyp/test/hard_dependency/src/d.c
deleted file mode 100644
index d016c3ce71..0000000000
--- a/deps/gyp/test/hard_dependency/src/d.c
+++ /dev/null
@@ -1,9 +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. */
-
-#include "c.h"
-
-int funcD() {
- return funcC();
-}
diff --git a/deps/gyp/test/hard_dependency/src/emit.py b/deps/gyp/test/hard_dependency/src/emit.py
deleted file mode 100755
index 2df74b79a1..0000000000
--- a/deps/gyp/test/hard_dependency/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/hard_dependency/src/hard_dependency.gyp b/deps/gyp/test/hard_dependency/src/hard_dependency.gyp
deleted file mode 100644
index 4479c5f045..0000000000
--- a/deps/gyp/test/hard_dependency/src/hard_dependency.gyp
+++ /dev/null
@@ -1,78 +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',
- ],
- 'hard_dependency': 1,
- 'actions': [
- {
- 'action_name': 'generate_headers',
- 'inputs': [
- 'emit.py'
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/generated.h'
- ],
- 'action': [
- 'python',
- 'emit.py',
- '<(SHARED_INTERMEDIATE_DIR)/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': 'static_library',
- 'sources': [
- 'b.c',
- 'b.h',
- ],
- 'dependencies': [
- 'a',
- ],
- 'export_dependent_settings': [
- 'a',
- ],
- },
- {
- 'target_name': 'c',
- 'type': 'static_library',
- 'sources': [
- 'c.c',
- 'c.h',
- ],
- 'dependencies': [
- 'b',
- ],
- },
- {
- 'target_name': 'd',
- 'type': 'static_library',
- 'sources': [
- 'd.c',
- ],
- 'dependencies': [
- 'c',
- ],
- }
- ],
-}