1 #!/usr/bin/env python 2 3 # Copyright (c) 2012 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 simplest-possible build of a "Hello, world!" program 9 using the default build target. 10 """ 11 12 import TestGyp 13 14 test = TestGyp.TestGyp(workdir='workarea_default') 15 16 if test.format == 'xcode-ninja': 17 # The xcode-ninja generator doesn't support --build 18 # cf. https://code.google.com/p/gyp/issues/detail?id=453 19 test.skip_test() 20 21 test.run_gyp('hello.gyp', '--build=Default') 22 23 test.run_built_executable('hello', stdout="Hello, world!\n") 24 25 test.up_to_date('hello.gyp', test.DEFAULT) 26 27 test.pass_test() 28