1 #!/usr/bin/env python 2 3 # Copyright (c) 2011 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 """ 8 Verifies simple rules when using an explicit build target of 'all'. 9 """ 10 11 import TestGyp 12 import os 13 14 test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) 15 16 test.run_gyp('actions.gyp', chdir='src') 17 18 test.relocate('src', 'relocate/src') 19 20 test.build('actions.gyp', chdir='relocate/src') 21 22 expect = """\ 23 hi c 24 hello baz 25 """ 26 if test.format == 'xcode': 27 chdir = 'relocate/src/subdir' 28 else: 29 chdir = 'relocate/src' 30 test.run_built_executable('gencc_int_output', chdir=chdir, stdout=expect) 31 32 test.must_match('relocate/src/subdir/foo/bar/baz.printed', 33 os.path.join('foo', 'bar')) 34 test.must_match('relocate/src/subdir/a/b/c.printed', os.path.join('a', 'b')) 35 36 test.pass_test() 37