1#!/usr/bin/env python 2 3# Copyright (c) 2013 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 7""" 8Verifies that dependencies on generated headers work, even if the header has 9a mixed-case file name. 10""" 11 12import TestGyp 13 14test = TestGyp.TestGyp() 15 16if test.format == 'android': 17 # This test currently fails on android. Investigate why, fix the issues 18 # responsible, and reenable this test on android. See bug: 19 # https://code.google.com/p/gyp/issues/detail?id=436 20 test.skip_test(message='Test fails on android. Fix and reenable.\n') 21 22CHDIR = 'generated-header' 23 24test.run_gyp('test.gyp', chdir=CHDIR) 25test.build('test.gyp', 'program', chdir=CHDIR) 26test.up_to_date('test.gyp', 'program', chdir=CHDIR) 27 28expect = 'foobar output\n' 29test.run_built_executable('program', chdir=CHDIR, stdout=expect) 30 31# Change what's written to the generated header, regyp and rebuild, and check 32# that the change makes it to the executable and that the build is clean. 33test.sleep() 34test.write('generated-header/test.gyp', 35 test.read('generated-header/test.gyp').replace('foobar', 'barbaz')) 36 37test.run_gyp('test.gyp', chdir=CHDIR) 38test.build('test.gyp', 'program', chdir=CHDIR) 39test.up_to_date('test.gyp', 'program', chdir=CHDIR) 40 41expect = 'barbaz output\n' 42test.run_built_executable('program', chdir=CHDIR, stdout=expect) 43 44test.pass_test() 45