Sha256: 2cb78bb363d04e3ba28f463c72966d507127e8c801bbd3c278db60ee99cbeffa

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2013 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 and
--generator-output is used.
"""

import TestGyp

# Regenerating build files when a gyp file changes is currently only supported
# by the make and Android generators, and --generator-output is not supported
# by Android and ninja, so we can only test for make.
test = TestGyp.TestGyp(formats=['make'])

CHDIR='generator-output'

test.run_gyp('hello.gyp', '--generator-output=%s' % CHDIR)

test.build('hello.gyp', test.ALL, chdir=CHDIR)

test.run_built_executable('hello', stdout="Hello, world!\n", chdir=CHDIR)

# 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, chdir=CHDIR)

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

test.pass_test()

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp-output.py
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp-output.py