| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 3 """ | 7 """ |
| 4 Verifies that Makefiles don't get rebuilt when a source gyp file changes and | 8 Verifies that Makefiles don't get rebuilt when a source gyp file changes and |
| 5 the disable_regeneration generator flag is set. | 9 the disable_regeneration generator flag is set. |
| 6 """ | 10 """ |
| 7 | 11 |
| 8 import TestGyp | 12 import TestGyp |
| 9 | 13 |
| 10 test = TestGyp.TestGyp() | 14 test = TestGyp.TestGyp() |
| 11 | 15 |
| 12 test.run_gyp('hello.gyp', '-Gauto_regeneration=0') | 16 test.run_gyp('hello.gyp', '-Gauto_regeneration=0') |
| 13 | 17 |
| 14 test.build('hello.gyp', test.ALL) | 18 test.build('hello.gyp', test.ALL) |
| 15 | 19 |
| 16 test.run_built_executable('hello', stdout="Hello, world!\n") | 20 test.run_built_executable('hello', stdout="Hello, world!\n") |
| 17 | 21 |
| 18 # Sleep so that the changed gyp file will have a newer timestamp than the | 22 # Sleep so that the changed gyp file will have a newer timestamp than the |
| 19 # previously generated build files. | 23 # previously generated build files. |
| 20 test.sleep() | 24 test.sleep() |
| 21 test.write('hello.gyp', test.read('hello2.gyp')) | 25 test.write('hello.gyp', test.read('hello2.gyp')) |
| 22 | 26 |
| 23 test.build('hello.gyp', test.ALL) | 27 test.build('hello.gyp', test.ALL) |
| 24 | 28 |
| 25 # Should still be the old executable, as regeneration was disabled. | 29 # Should still be the old executable, as regeneration was disabled. |
| 26 test.run_built_executable('hello', stdout="Hello, world!\n") | 30 test.run_built_executable('hello', stdout="Hello, world!\n") |
| 27 | 31 |
| 28 test.pass_test() | 32 test.pass_test() |
| OLD | NEW |