Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: test/mac/gyptest-strip.py

Issue 421453003: Add TestGypXcodeNinja to run tests against the xcode-ninja generator (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase onto origin/master Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mac/gyptest-rpath.py ('k') | test/mac/gyptest-type-envvars.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 stripping works. 8 Verifies that stripping works.
9 """ 9 """
10 10
(...skipping 23 matching lines...) Expand all
34 n = int(m.group(1)) 34 n = int(m.group(1))
35 if n != n_expected: 35 if n != n_expected:
36 print 'Stripping: Expected %d symbols, got %d' % (n_expected, n) 36 print 'Stripping: Expected %d symbols, got %d' % (n_expected, n)
37 test.fail_test() 37 test.fail_test()
38 38
39 # Starting with Xcode 5.0, clang adds an additional symbols to the compiled 39 # Starting with Xcode 5.0, clang adds an additional symbols to the compiled
40 # file when using a relative path to the input file. So when using ninja 40 # file when using a relative path to the input file. So when using ninja
41 # with Xcode 5.0 or higher, take this additional symbol into consideration 41 # with Xcode 5.0 or higher, take this additional symbol into consideration
42 # for unstripped builds (it is stripped by all strip commands). 42 # for unstripped builds (it is stripped by all strip commands).
43 expected_extra_symbol_count = 0 43 expected_extra_symbol_count = 0
44 if test.format == 'ninja' and TestMac.Xcode.Version() >= '0500': 44 if test.format in ['ninja', 'xcode-ninja'] \
45 and TestMac.Xcode.Version() >= '0500':
45 expected_extra_symbol_count = 1 46 expected_extra_symbol_count = 1
46 47
47 # The actual numbers here are not interesting, they just need to be the same 48 # The actual numbers here are not interesting, they just need to be the same
48 # in both the xcode and the make build. 49 # in both the xcode and the make build.
49 CheckNsyms(OutPath('no_postprocess'), 29 + expected_extra_symbol_count) 50 CheckNsyms(OutPath('no_postprocess'), 29 + expected_extra_symbol_count)
50 CheckNsyms(OutPath('no_strip'), 29 + expected_extra_symbol_count) 51 CheckNsyms(OutPath('no_strip'), 29 + expected_extra_symbol_count)
51 CheckNsyms(OutPath('strip_all'), 0) 52 CheckNsyms(OutPath('strip_all'), 0)
52 CheckNsyms(OutPath('strip_nonglobal'), 6) 53 CheckNsyms(OutPath('strip_nonglobal'), 6)
53 CheckNsyms(OutPath('strip_debugging'), 7) 54 CheckNsyms(OutPath('strip_debugging'), 7)
54 CheckNsyms(OutPath('strip_all_custom_flags'), 0) 55 CheckNsyms(OutPath('strip_all_custom_flags'), 0)
55 CheckNsyms(test.built_file_path( 56 CheckNsyms(test.built_file_path(
56 'strip_all_bundle.framework/Versions/A/strip_all_bundle', chdir='strip'), 57 'strip_all_bundle.framework/Versions/A/strip_all_bundle', chdir='strip'),
57 0) 58 0)
58 CheckNsyms(OutPath('strip_save'), 7) 59 CheckNsyms(OutPath('strip_save'), 7)
59 60
60 test.pass_test() 61 test.pass_test()
OLDNEW
« no previous file with comments | « test/mac/gyptest-rpath.py ('k') | test/mac/gyptest-type-envvars.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698