OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2011 Google Inc. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """ | 7 """ |
8 Verifies simple rules when using an explicit build target of 'all'. | 8 Verifies simple rules when using an explicit build target of 'all'. |
9 """ | 9 """ |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 expect = """\ | 24 expect = """\ |
25 Hello from program.c | 25 Hello from program.c |
26 Hello from function1.in | 26 Hello from function1.in |
27 Hello from function2.in | 27 Hello from function2.in |
28 """ | 28 """ |
29 | 29 |
30 if test.format == 'xcode': | 30 if test.format == 'xcode': |
31 chdir = 'relocate/src/subdir1' | 31 chdir = 'relocate/src/subdir1' |
32 else: | 32 else: |
33 chdir = 'relocate/src' | 33 chdir = 'relocate/src' |
34 test.run_built_executable('program', chdir=chdir, stdout=expect) | 34 |
| 35 if test.format == 'android': |
| 36 test.run_built_executable('program', chdir=chdir, stdout=expect, |
| 37 subdir='subdir1') |
| 38 else: |
| 39 test.run_built_executable('program', chdir=chdir, stdout=expect) |
35 | 40 |
36 expect = """\ | 41 expect = """\ |
37 Hello from program.c | 42 Hello from program.c |
38 Hello from function3.in | 43 Hello from function3.in |
39 """ | 44 """ |
40 | 45 |
41 if test.format == 'xcode': | 46 if test.format == 'xcode': |
42 chdir = 'relocate/src/subdir3' | 47 chdir = 'relocate/src/subdir3' |
43 else: | 48 else: |
44 chdir = 'relocate/src' | 49 chdir = 'relocate/src' |
45 test.run_built_executable('program2', chdir=chdir, stdout=expect) | 50 |
| 51 if test.format == 'android': |
| 52 test.run_built_executable('program2', chdir=chdir, stdout=expect, |
| 53 subdir='subdir3') |
| 54 else: |
| 55 test.run_built_executable('program2', chdir=chdir, stdout=expect) |
46 | 56 |
47 test.must_match('relocate/src/subdir2/file1.out', 'Hello from file1.in\n') | 57 test.must_match('relocate/src/subdir2/file1.out', 'Hello from file1.in\n') |
48 test.must_match('relocate/src/subdir2/file2.out', 'Hello from file2.in\n') | 58 test.must_match('relocate/src/subdir2/file2.out', 'Hello from file2.in\n') |
49 | 59 |
50 test.must_match('relocate/src/subdir2/file1.out2', 'Hello from file1.in\n') | 60 test.must_match('relocate/src/subdir2/file1.out2', 'Hello from file1.in\n') |
51 test.must_match('relocate/src/subdir2/file2.out2', 'Hello from file2.in\n') | 61 test.must_match('relocate/src/subdir2/file2.out2', 'Hello from file2.in\n') |
52 | 62 |
53 test.must_match('relocate/src/subdir2/file1.out4', 'Hello from file1.in\n') | 63 test.must_match('relocate/src/subdir2/file1.out4', 'Hello from file1.in\n') |
54 test.must_match('relocate/src/subdir2/file2.out4', 'Hello from file2.in\n') | 64 test.must_match('relocate/src/subdir2/file2.out4', 'Hello from file2.in\n') |
55 test.must_match('relocate/src/subdir2/file1.copy', 'Hello from file1.in\n') | 65 test.must_match('relocate/src/subdir2/file1.copy', 'Hello from file1.in\n') |
56 | 66 |
57 test.must_match('relocate/src/external/file1.external_rules.out', | 67 test.must_match('relocate/src/external/file1.external_rules.out', |
58 'Hello from file1.in\n') | 68 'Hello from file1.in\n') |
59 test.must_match('relocate/src/external/file2.external_rules.out', | 69 test.must_match('relocate/src/external/file2.external_rules.out', |
60 'Hello from file2.in\n') | 70 'Hello from file2.in\n') |
61 | 71 |
62 expect = """\ | 72 expect = """\ |
63 Hello from program.c | 73 Hello from program.c |
64 Got 41. | 74 Got 41. |
65 """ | 75 """ |
66 | 76 |
67 if test.format == 'xcode': | 77 if test.format == 'xcode': |
68 chdir = 'relocate/src/subdir4' | 78 chdir = 'relocate/src/subdir4' |
69 else: | 79 else: |
70 chdir = 'relocate/src' | 80 chdir = 'relocate/src' |
71 test.run_built_executable('program4', chdir=chdir, stdout=expect) | 81 |
| 82 if test.format == 'android': |
| 83 test.run_built_executable('program4', chdir=chdir, stdout=expect, |
| 84 subdir='subdir4') |
| 85 else: |
| 86 test.run_built_executable('program4', chdir=chdir, stdout=expect) |
72 | 87 |
73 test.pass_test() | 88 test.pass_test() |
OLD | NEW |