OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 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 | 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 Verify that building an object file correctly depends on running actions in | 8 Verify that building an object file correctly depends on running actions in |
9 dependent targets, but not the targets themselves. | 9 dependent targets, but not the targets themselves. |
10 """ | 10 """ |
11 | 11 |
| 12 from __future__ import print_function |
| 13 |
12 import os | 14 import os |
13 import sys | 15 import sys |
14 | 16 |
15 if sys.platform == 'win32': | 17 if sys.platform == 'win32': |
16 print "This test is currently disabled: https://crbug.com/483696." | 18 print("This test is currently disabled: https://crbug.com/483696.") |
17 sys.exit(0) | 19 sys.exit(0) |
18 | 20 |
19 | 21 |
20 import TestGyp | 22 import TestGyp |
21 | 23 |
22 # NOTE(piman): This test will not work with other generators because: | 24 # NOTE(piman): This test will not work with other generators because: |
23 # - it explicitly tests the optimization, which is not implemented (yet?) on | 25 # - it explicitly tests the optimization, which is not implemented (yet?) on |
24 # other generators | 26 # other generators |
25 # - it relies on the exact path to output object files, which is generator | 27 # - it relies on the exact path to output object files, which is generator |
26 # dependent, and actually, relies on the ability to build only that object file, | 28 # dependent, and actually, relies on the ability to build only that object file, |
(...skipping 26 matching lines...) Expand all Loading... |
53 chdir=chdir) | 55 chdir=chdir) |
54 | 56 |
55 # 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c | 57 # 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c |
56 # compile | 58 # compile |
57 test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir) | 59 test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir) |
58 test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir) | 60 test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir) |
59 test.built_file_must_exist(os.path.join('obj', 'c.c' + objext), chdir=chdir) | 61 test.built_file_must_exist(os.path.join('obj', 'c.c' + objext), chdir=chdir) |
60 | 62 |
61 | 63 |
62 test.pass_test() | 64 test.pass_test() |
OLD | NEW |