diff options
Diffstat (limited to 'deps/gyp/test/rules-rebuild')
-rwxr-xr-x | deps/gyp/test/rules-rebuild/gyptest-all.py | 70 | ||||
-rwxr-xr-x | deps/gyp/test/rules-rebuild/gyptest-default.py | 91 | ||||
-rw-r--r-- | deps/gyp/test/rules-rebuild/src/main.c | 12 | ||||
-rwxr-xr-x | deps/gyp/test/rules-rebuild/src/make-sources.py | 19 | ||||
-rw-r--r-- | deps/gyp/test/rules-rebuild/src/prog1.in | 7 | ||||
-rw-r--r-- | deps/gyp/test/rules-rebuild/src/prog2.in | 7 | ||||
-rw-r--r-- | deps/gyp/test/rules-rebuild/src/same_target.gyp | 31 |
7 files changed, 0 insertions, 237 deletions
diff --git a/deps/gyp/test/rules-rebuild/gyptest-all.py b/deps/gyp/test/rules-rebuild/gyptest-all.py deleted file mode 100755 index aaaa2a6e6f..0000000000 --- a/deps/gyp/test/rules-rebuild/gyptest-all.py +++ /dev/null @@ -1,70 +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 that a rule that generates multiple outputs rebuilds -correctly when the inputs change. -""" - -import TestGyp - -test = TestGyp.TestGyp(workdir='workarea_all') - -test.run_gyp('same_target.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - - -test.build('same_target.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from prog1.in! -Hello from prog2.in! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -test.sleep() -contents = test.read(['relocate', 'src', 'prog1.in']) -contents = contents.replace('!', ' AGAIN!') -test.write(['relocate', 'src', 'prog1.in'], contents) - -test.build('same_target.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from prog1.in AGAIN! -Hello from prog2.in! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -test.sleep() -contents = test.read(['relocate', 'src', 'prog2.in']) -contents = contents.replace('!', ' AGAIN!') -test.write(['relocate', 'src', 'prog2.in'], contents) - -test.build('same_target.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from prog1.in AGAIN! -Hello from prog2.in AGAIN! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -test.pass_test() diff --git a/deps/gyp/test/rules-rebuild/gyptest-default.py b/deps/gyp/test/rules-rebuild/gyptest-default.py deleted file mode 100755 index ac3f0209aa..0000000000 --- a/deps/gyp/test/rules-rebuild/gyptest-default.py +++ /dev/null @@ -1,91 +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 a rule that generates multiple outputs rebuilds -correctly when the inputs change. -""" - -import TestGyp - -test = TestGyp.TestGyp(workdir='workarea_default') - -test.run_gyp('same_target.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - - -test.build('same_target.gyp', chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from prog1.in! -Hello from prog2.in! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -test.sleep() -contents = test.read(['relocate', 'src', 'prog1.in']) -contents = contents.replace('!', ' AGAIN!') -test.write(['relocate', 'src', 'prog1.in'], contents) - -test.build('same_target.gyp', chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from prog1.in AGAIN! -Hello from prog2.in! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -test.sleep() -contents = test.read(['relocate', 'src', 'prog2.in']) -contents = contents.replace('!', ' AGAIN!') -test.write(['relocate', 'src', 'prog2.in'], contents) - -test.build('same_target.gyp', chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from prog1.in AGAIN! -Hello from prog2.in AGAIN! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -# Test that modifying a rule's inputs (specifically, make-sources.py) causes -# the targets to be built. - -test.sleep() -contents = test.read(['relocate', 'src', 'make-sources.py']) -contents = contents.replace('%s', 'the amazing %s') -test.write(['relocate', 'src', 'make-sources.py'], contents) - -test.build('same_target.gyp', chdir='relocate/src') - -expect = """\ -Hello from main.c -Hello from the amazing prog1.in AGAIN! -Hello from the amazing prog2.in AGAIN! -""" - -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - -test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') - - -test.pass_test() diff --git a/deps/gyp/test/rules-rebuild/src/main.c b/deps/gyp/test/rules-rebuild/src/main.c deleted file mode 100644 index bd8fbb20ea..0000000000 --- a/deps/gyp/test/rules-rebuild/src/main.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> - -extern void prog1(void); -extern void prog2(void); - -int main(void) -{ - printf("Hello from main.c\n"); - prog1(); - prog2(); - return 0; -} diff --git a/deps/gyp/test/rules-rebuild/src/make-sources.py b/deps/gyp/test/rules-rebuild/src/make-sources.py deleted file mode 100755 index 7ec022780c..0000000000 --- a/deps/gyp/test/rules-rebuild/src/make-sources.py +++ /dev/null @@ -1,19 +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 - -assert len(sys.argv) == 4, sys.argv - -(in_file, c_file, h_file) = sys.argv[1:] - -def write_file(filename, contents): - open(filename, 'wb').write(contents) - -write_file(c_file, open(in_file, 'rb').read()) - -write_file(h_file, '#define NAME "%s"\n' % in_file) - -sys.exit(0) diff --git a/deps/gyp/test/rules-rebuild/src/prog1.in b/deps/gyp/test/rules-rebuild/src/prog1.in deleted file mode 100644 index 191b00ef1e..0000000000 --- a/deps/gyp/test/rules-rebuild/src/prog1.in +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> -#include "prog1.h" - -void prog1(void) -{ - printf("Hello from %s!\n", NAME); -} diff --git a/deps/gyp/test/rules-rebuild/src/prog2.in b/deps/gyp/test/rules-rebuild/src/prog2.in deleted file mode 100644 index 7bfac5104c..0000000000 --- a/deps/gyp/test/rules-rebuild/src/prog2.in +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> -#include "prog2.h" - -void prog2(void) -{ - printf("Hello from %s!\n", NAME); -} diff --git a/deps/gyp/test/rules-rebuild/src/same_target.gyp b/deps/gyp/test/rules-rebuild/src/same_target.gyp deleted file mode 100644 index 22ba56056d..0000000000 --- a/deps/gyp/test/rules-rebuild/src/same_target.gyp +++ /dev/null @@ -1,31 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'main.c', - 'prog1.in', - 'prog2.in', - ], - 'rules': [ - { - 'rule_name': 'make_sources', - 'extension': 'in', - 'inputs': [ - 'make-sources.py', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c', - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).h', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_NAME)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} |