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

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

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 months 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
OLDNEW
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 from __future__ import print_function
12
11 import TestGyp 13 import TestGyp
12 14
13 import re 15 import re
14 import subprocess 16 import subprocess
15 import sys 17 import sys
16 import time 18 import time
17 19
18 if sys.platform == 'darwin': 20 if sys.platform == 'darwin':
19 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) 21 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
20 22
(...skipping 12 matching lines...) Expand all
33 35
34 # Filter out mysterious "00 0000 OPT radr://5614542" symbol which 36 # Filter out mysterious "00 0000 OPT radr://5614542" symbol which
35 # is apparently only printed on the bots (older toolchain?). 37 # is apparently only printed on the bots (older toolchain?).
36 # Yes, "radr", not "rdar". 38 # Yes, "radr", not "rdar".
37 o = ''.join(filter(lambda s: 'radr://5614542' not in s, o.splitlines(True))) 39 o = ''.join(filter(lambda s: 'radr://5614542' not in s, o.splitlines(True)))
38 40
39 o = o.replace('A', 'T') 41 o = o.replace('A', 'T')
40 o = re.sub(r'^[a-fA-F0-9]+', 'XXXXXXXX', o, flags=re.MULTILINE) 42 o = re.sub(r'^[a-fA-F0-9]+', 'XXXXXXXX', o, flags=re.MULTILINE)
41 assert not proc.returncode 43 assert not proc.returncode
42 if o != o_expected: 44 if o != o_expected:
43 print 'Stripping: Expected symbols """\n%s""", got """\n%s"""' % ( 45 print('Stripping: Expected symbols """\n%s""", got """\n%s"""' % (
44 o_expected, o) 46 o_expected, o))
45 test.fail_test() 47 test.fail_test()
46 48
47 CheckNsyms(OutPath('libsingle_dylib.dylib'), 49 CheckNsyms(OutPath('libsingle_dylib.dylib'),
48 """\ 50 """\
49 XXXXXXXX S _ci 51 XXXXXXXX S _ci
50 XXXXXXXX S _i 52 XXXXXXXX S _i
51 XXXXXXXX T _the_function 53 XXXXXXXX T _the_function
52 XXXXXXXX t _the_hidden_function 54 XXXXXXXX t _the_hidden_function
53 XXXXXXXX T _the_used_function 55 XXXXXXXX T _the_used_function
54 XXXXXXXX T _the_visible_function 56 XXXXXXXX T _the_visible_function
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698