| 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 Verifies that invalid strings files cause the build to fail. | 8 Verifies that invalid strings files cause the build to fail. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 saw_expected_error[0] = True | 27 saw_expected_error[0] = True |
| 28 return True | 28 return True |
| 29 return False | 29 return False |
| 30 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], match=match) | 30 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], match=match) |
| 31 | 31 |
| 32 test.run_gyp('test-error.gyp', chdir='app-bundle') | 32 test.run_gyp('test-error.gyp', chdir='app-bundle') |
| 33 | 33 |
| 34 test.build('test-error.gyp', test.ALL, chdir='app-bundle') | 34 test.build('test-error.gyp', test.ALL, chdir='app-bundle') |
| 35 | 35 |
| 36 # Ninja pipes stderr of subprocesses to stdout. | 36 # Ninja pipes stderr of subprocesses to stdout. |
| 37 if test.format == 'ninja' and expected_error in test.stdout(): | 37 if test.format in ['ninja', 'xcode-ninja'] \ |
| 38 and expected_error in test.stdout(): |
| 38 saw_expected_error[0] = True | 39 saw_expected_error[0] = True |
| 39 | 40 |
| 40 if saw_expected_error[0]: | 41 if saw_expected_error[0]: |
| 41 test.pass_test() | 42 test.pass_test() |
| 42 else: | 43 else: |
| 43 test.fail_test() | 44 test.fail_test() |
| OLD | NEW |