| OLD | NEW |
| (Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2015 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 |
| 7 """ |
| 8 Verifies actions with multiple outputs will correctly rebuild. |
| 9 """ |
| 10 |
| 11 import TestGyp |
| 12 import os |
| 13 |
| 14 test = TestGyp.TestGyp() |
| 15 |
| 16 test.run_gyp('multiple-outputs.gyp', chdir='src') |
| 17 |
| 18 chdir = 'relocate/src' |
| 19 test.relocate('src', chdir) |
| 20 |
| 21 def build_and_check(): |
| 22 # Build + check that both outputs exist. |
| 23 test.build('multiple-outputs.gyp', chdir=chdir) |
| 24 test.built_file_must_exist('out1.txt', chdir=chdir) |
| 25 test.built_file_must_exist('out2.txt', chdir=chdir) |
| 26 |
| 27 # Plain build. |
| 28 build_and_check() |
| 29 |
| 30 # Remove either + rebuild. Both should exist (again). |
| 31 os.remove(test.built_file_path('out1.txt', chdir=chdir)) |
| 32 build_and_check(); |
| 33 |
| 34 # Remove the other + rebuild. Both should exist (again). |
| 35 os.remove(test.built_file_path('out2.txt', chdir=chdir)) |
| 36 build_and_check(); |
| 37 |
| 38 test.pass_test() |
| OLD | NEW |