mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
828 B
33 lines
828 B
13 years ago
|
#!/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 Makefiles get rebuilt when a source gyp file changes.
|
||
|
"""
|
||
|
|
||
|
import TestGyp
|
||
|
|
||
|
# Regenerating build files when a gyp file changes is currently only supported
|
||
|
# by the make generator.
|
||
|
test = TestGyp.TestGyp(formats=['make'])
|
||
|
|
||
|
test.run_gyp('hello.gyp')
|
||
|
|
||
|
test.build('hello.gyp', test.ALL)
|
||
|
|
||
|
test.run_built_executable('hello', stdout="Hello, world!\n")
|
||
|
|
||
|
# Sleep so that the changed gyp file will have a newer timestamp than the
|
||
|
# previously generated build files.
|
||
|
test.sleep()
|
||
|
test.write('hello.gyp', test.read('hello2.gyp'))
|
||
|
|
||
|
test.build('hello.gyp', test.ALL)
|
||
|
|
||
|
test.run_built_executable('hello', stdout="Hello, two!\n")
|
||
|
|
||
|
test.pass_test()
|