| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2013 Google Inc. All rights reserved. | 3 # Copyright (c) 2013 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 the default STRIP_STYLEs match between different generators. | 8 Verifies that the default STRIP_STYLEs match between different generators. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import TestGyp | 11 import TestGyp |
| 12 | 12 |
| 13 import re | 13 import re |
| 14 import subprocess | 14 import subprocess |
| 15 import sys | 15 import sys |
| 16 import time | 16 import time |
| 17 | 17 |
| 18 if sys.platform == 'darwin': | 18 if sys.platform == 'darwin': |
| 19 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) | 19 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) |
| 20 | 20 |
| 21 CHDIR='strip' | 21 CHDIR='strip' |
| 22 test.run_gyp('test-defaults.gyp', chdir=CHDIR) | 22 test.run_gyp('test-defaults.gyp', |
| 23 '-G', 'xcode_ninja_target_pattern=^.*$', |
| 24 chdir=CHDIR) |
| 23 | 25 |
| 24 test.build('test-defaults.gyp', test.ALL, chdir=CHDIR) | 26 test.build('test-defaults.gyp', test.ALL, chdir=CHDIR) |
| 25 | 27 |
| 26 # Lightweight check if stripping was done. | 28 # Lightweight check if stripping was done. |
| 27 def OutPath(s): | 29 def OutPath(s): |
| 28 return test.built_file_path(s, chdir=CHDIR) | 30 return test.built_file_path(s, chdir=CHDIR) |
| 29 | 31 |
| 30 def CheckNsyms(p, o_expected): | 32 def CheckNsyms(p, o_expected): |
| 31 proc = subprocess.Popen(['nm', '-aU', p], stdout=subprocess.PIPE) | 33 proc = subprocess.Popen(['nm', '-aU', p], stdout=subprocess.PIPE) |
| 32 o = proc.communicate()[0] | 34 o = proc.communicate()[0] |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 XXXXXXXX T _the_used_function | 88 XXXXXXXX T _the_used_function |
| 87 XXXXXXXX T _the_visible_function | 89 XXXXXXXX T _the_visible_function |
| 88 """) | 90 """) |
| 89 CheckNsyms(test.built_file_path( | 91 CheckNsyms(test.built_file_path( |
| 90 'bundle_exe.app/Contents/MacOS/bundle_exe', chdir=CHDIR), | 92 'bundle_exe.app/Contents/MacOS/bundle_exe', chdir=CHDIR), |
| 91 """\ | 93 """\ |
| 92 XXXXXXXX T __mh_execute_header | 94 XXXXXXXX T __mh_execute_header |
| 93 """) | 95 """) |
| 94 | 96 |
| 95 test.pass_test() | 97 test.pass_test() |
| OLD | NEW |