blob: 2131972f245c5d593d1c3811e93df98534a7d782 [file] [log] [blame]
#!/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 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 and Android generators.
test = TestGyp.TestGyp(formats=['make', 'android'])
test.run_gyp('hello.gyp')'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.write('hello.gyp','hello2.gyp'))'hello.gyp', test.ALL)
test.run_built_executable('hello', stdout="Hello, two!\n")