summaryrefslogtreecommitdiff
path: root/test/hello/gyptest-regyp.py
blob: a4b9c131f2f877f826a66b0702bfad616f7122a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python

"""
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_all('hello.gyp')

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_all('hello.gyp')

test.run_built_executable('hello', stdout="Hello, two!\n")

test.pass_test()