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

Side by Side Diff: test/mac/gyptest-installname.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-global-settings.py ('k') | test/mac/gyptest-ldflags.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 LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled 8 Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled
9 correctly. 9 correctly.
10 """ 10 """
11 11
12 import TestGyp 12 import TestGyp
13 13
14 import re 14 import re
15 import subprocess 15 import subprocess
16 import sys 16 import sys
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 = 'installname' 21 CHDIR = 'installname'
22 test.run_gyp('test.gyp', chdir=CHDIR) 22 test.run_gyp('test.gyp', chdir=CHDIR)
23
23 test.build('test.gyp', test.ALL, chdir=CHDIR) 24 test.build('test.gyp', test.ALL, chdir=CHDIR)
24 25
25 def GetInstallname(p): 26 def GetInstallname(p):
26 p = test.built_file_path(p, chdir=CHDIR) 27 p = test.built_file_path(p, chdir=CHDIR)
27 r = re.compile(r'cmd LC_ID_DYLIB.*?name (.*?) \(offset \d+\)', re.DOTALL) 28 r = re.compile(r'cmd LC_ID_DYLIB.*?name (.*?) \(offset \d+\)', re.DOTALL)
28 proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE) 29 proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE)
29 o = proc.communicate()[0] 30 o = proc.communicate()[0]
30 assert not proc.returncode 31 assert not proc.returncode
31 m = r.search(o) 32 m = r.search(o)
32 assert m 33 assert m
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 'install_name_with_info_plist') != 71 'install_name_with_info_plist') !=
71 '/Library/Frameworks/install_name_with_info_plist.framework/' 72 '/Library/Frameworks/install_name_with_info_plist.framework/'
72 'Versions/A/install_name_with_info_plist'): 73 'Versions/A/install_name_with_info_plist'):
73 test.fail_test() 74 test.fail_test()
74 75
75 if ('DYLIB_INSTALL_NAME_BASE:standardizepath: command not found' in 76 if ('DYLIB_INSTALL_NAME_BASE:standardizepath: command not found' in
76 test.stdout()): 77 test.stdout()):
77 test.fail_test() 78 test.fail_test()
78 79
79 test.pass_test() 80 test.pass_test()
OLDNEW
« no previous file with comments | « test/mac/gyptest-global-settings.py ('k') | test/mac/gyptest-ldflags.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698