Chromium Code Reviews| Index: test/actions-multiple/gyptest-all.py |
| =================================================================== |
| --- test/actions-multiple/gyptest-all.py (revision 1402) |
| +++ test/actions-multiple/gyptest-all.py (working copy) |
| @@ -1,6 +1,6 @@ |
| #!/usr/bin/env python |
| -# Copyright (c) 2011 Google Inc. All rights reserved. |
| +# Copyright (c) 2012 Google Inc. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| @@ -8,6 +8,8 @@ |
| Verifies two actions can be attached to the same input files. |
| """ |
| +import sys |
| + |
| import TestGyp |
| test = TestGyp.TestGyp() |
| @@ -16,6 +18,27 @@ |
| test.relocate('src', 'relocate/src') |
| +# Test that multiple actions in a 'none' target that |
| +# depend on another 'none' target cause depended on target to |
|
Nico
2012/05/29 21:33:08
this doesn't parse for me
bradn
2012/05/29 21:44:26
Done.
|
| +# run individually. |
| +# This sub-test can only be done with generators/build tools that can |
| +# be asked to build individual files rather than whole targets (make, ninja). |
| +if test.format in ['make', 'ninja']: |
| + # Select location of target based on generator. |
| + if test.format == 'make': |
| + target='multi2.txt' |
|
Nico
2012/05/29 21:33:08
spaces around =
bradn
2012/05/29 21:44:26
Done.
|
| + elif test.format == 'ninja': |
| + if sys.platform in ['win32', 'cygwin']: |
| + target='..\\..\\multi2.txt' |
| + else: |
| + target='../../multi2.txt' |
| + else: |
| + assert False |
| + test.build('actions.gyp', chdir='relocate/src', target=target) |
| + test.must_contain('relocate/src/multi2.txt', 'hello there') |
| + test.must_contain('relocate/src/multi_dep.txt', 'hello there') |
| + |
| + |
| # Test that two actions can be attached to the same inputs. |
| test.build('actions.gyp', test.ALL, chdir='relocate/src') |
| test.must_contain('relocate/src/output1.txt', 'hello there') |