| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2009 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 |
| 3 """ | 7 """ |
| 4 """ | 8 """ |
| 5 | 9 |
| 6 import TestGyp | 10 import TestGyp |
| 7 | 11 |
| 8 test = TestGyp.TestGyp() | 12 test = TestGyp.TestGyp() |
| 9 | 13 |
| 10 test.run_gyp('build/all.gyp', chdir='src') | 14 test.run_gyp('build/all.gyp', chdir='src') |
| 11 | 15 |
| 12 test.relocate('src', 'relocate/src') | 16 test.relocate('src', 'relocate/src') |
| 13 | 17 |
| 14 test.build('build/all.gyp', test.ALL, chdir='relocate/src') | 18 test.build('build/all.gyp', test.ALL, chdir='relocate/src') |
| 15 | 19 |
| 16 chdir = 'relocate/src/build' | 20 chdir = 'relocate/src/build' |
| 17 | 21 |
| 18 if test.format == 'xcode': | 22 if test.format == 'xcode': |
| 19 chdir = 'relocate/src/prog1' | 23 chdir = 'relocate/src/prog1' |
| 20 test.run_built_executable('prog1', | 24 test.run_built_executable('prog1', |
| 21 chdir=chdir, | 25 chdir=chdir, |
| 22 stdout="Hello from prog1.c\n") | 26 stdout="Hello from prog1.c\n") |
| 23 | 27 |
| 24 if test.format == 'xcode': | 28 if test.format == 'xcode': |
| 25 chdir = 'relocate/src/prog2' | 29 chdir = 'relocate/src/prog2' |
| 26 test.run_built_executable('prog2', | 30 test.run_built_executable('prog2', |
| 27 chdir=chdir, | 31 chdir=chdir, |
| 28 stdout="Hello from prog2.c\n") | 32 stdout="Hello from prog2.c\n") |
| 29 | 33 |
| 30 test.pass_test() | 34 test.pass_test() |
| OLD | NEW |