 Chromium Code Reviews
 Chromium Code Reviews Issue 421453003:
  Add TestGypXcodeNinja to run tests against the xcode-ninja generator  (Closed) 
  Base URL: https://chromium.googlesource.com/external/gyp.git@master
    
  
    Issue 421453003:
  Add TestGypXcodeNinja to run tests against the xcode-ninja generator  (Closed) 
  Base URL: https://chromium.googlesource.com/external/gyp.git@master| 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 --generator-output= behavior when using actions. | 8 Verifies --generator-output= behavior when using actions. | 
| 9 """ | 9 """ | 
| 10 | 10 | 
| 11 import TestGyp | 11 import TestGyp | 
| 12 | 12 | 
| 13 # Android doesn't support --generator-output. | 13 # Android doesn't support --generator-output. | 
| 14 test = TestGyp.TestGyp(formats=['!android']) | 14 test = TestGyp.TestGyp(formats=['!android']) | 
| 15 | 15 | 
| 16 # Bug: xcode-ninja doesn't respect --generator-output | |
| 
sdefresne
2014/09/02 15:13:05
Please file a bug (if it does not exists) and add
 
Tobias
2014/10/02 18:19:19
This is the bug that triggered all of this ;)
http
 | |
| 17 if test.format == 'xcode-ninja': | |
| 18 test.skip_test() | |
| 19 | |
| 16 # All the generated files should go under 'gypfiles'. The source directory | 20 # All the generated files should go under 'gypfiles'. The source directory | 
| 17 # ('actions') should be untouched. | 21 # ('actions') should be untouched. | 
| 18 test.writable(test.workpath('actions'), False) | 22 test.writable(test.workpath('actions'), False) | 
| 19 test.run_gyp('actions.gyp', | 23 test.run_gyp('actions.gyp', | 
| 20 '--generator-output=' + test.workpath('gypfiles'), | 24 '--generator-output=' + test.workpath('gypfiles'), | 
| 21 '-G', 'xcode_ninja_target_pattern=^pull_in_all_actions$', | 25 '-G', 'xcode_ninja_target_pattern=^pull_in_all_actions$', | 
| 22 chdir='actions') | 26 chdir='actions') | 
| 23 | 27 | 
| 24 test.writable(test.workpath('actions'), True) | 28 test.writable(test.workpath('actions'), True) | 
| 25 | 29 | 
| (...skipping 24 matching lines...) Expand all Loading... | |
| 50 if test.format == 'xcode': | 54 if test.format == 'xcode': | 
| 51 chdir = 'relocate/actions/subdir1' | 55 chdir = 'relocate/actions/subdir1' | 
| 52 else: | 56 else: | 
| 53 chdir = 'relocate/gypfiles' | 57 chdir = 'relocate/gypfiles' | 
| 54 test.run_built_executable('program', chdir=chdir, stdout=expect) | 58 test.run_built_executable('program', chdir=chdir, stdout=expect) | 
| 55 | 59 | 
| 56 test.must_match('relocate/actions/subdir2/actions-out/file.out', | 60 test.must_match('relocate/actions/subdir2/actions-out/file.out', | 
| 57 "Hello from make-file.py\n") | 61 "Hello from make-file.py\n") | 
| 58 | 62 | 
| 59 test.pass_test() | 63 test.pass_test() | 
| OLD | NEW |