michael@0: #!/usr/bin/env python michael@0: michael@0: # Copyright (c) 2012 Google Inc. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: """ michael@0: Verifies simple build of a "Hello, world!" program with loadable modules. The michael@0: default for all platforms should be to output the loadable modules to the same michael@0: path as the executable. michael@0: """ michael@0: michael@0: import TestGyp michael@0: michael@0: # Android doesn't support loadable modules michael@0: test = TestGyp.TestGyp(formats=['!android']) michael@0: michael@0: test.run_gyp('module.gyp', chdir='src') michael@0: michael@0: test.build('module.gyp', test.ALL, chdir='src') michael@0: michael@0: expect = """\ michael@0: Hello from program.c michael@0: Hello from lib1.c michael@0: Hello from lib2.c michael@0: """ michael@0: test.run_built_executable('program', chdir='src', stdout=expect) michael@0: michael@0: test.pass_test()