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

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

Issue 739303003: Cleanup pylint errors (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Fix mac Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « test/lib/TestWin.py ('k') | test/msvs/buildevents/gyptest-ninja-warnings.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 """
(...skipping 12 matching lines...) Expand all
23 test.build('test.gyp', test.ALL, chdir=CHDIR) 23 test.build('test.gyp', test.ALL, chdir=CHDIR)
24 24
25 def GetRpaths(p): 25 def GetRpaths(p):
26 p = test.built_file_path(p, chdir=CHDIR) 26 p = test.built_file_path(p, chdir=CHDIR)
27 r = re.compile(r'cmd LC_RPATH.*?path (.*?) \(offset \d+\)', re.DOTALL) 27 r = re.compile(r'cmd LC_RPATH.*?path (.*?) \(offset \d+\)', re.DOTALL)
28 proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE) 28 proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE)
29 o = proc.communicate()[0] 29 o = proc.communicate()[0]
30 assert not proc.returncode 30 assert not proc.returncode
31 return r.findall(o) 31 return r.findall(o)
32 32
33 if (GetRpaths('libdefault_rpath.dylib') != []): 33 if GetRpaths('libdefault_rpath.dylib') != []:
34 test.fail_test() 34 test.fail_test()
35 35
36 if (GetRpaths('libexplicit_rpath.dylib') != ['@executable_path/.']): 36 if GetRpaths('libexplicit_rpath.dylib') != ['@executable_path/.']:
37 test.fail_test() 37 test.fail_test()
38 38
39 if (GetRpaths('libexplicit_rpaths_escaped.dylib') != 39 if (GetRpaths('libexplicit_rpaths_escaped.dylib') !=
40 ['First rpath', 'Second rpath']): 40 ['First rpath', 'Second rpath']):
41 test.fail_test() 41 test.fail_test()
42 42
43 if (GetRpaths('My Framework.framework/My Framework') != ['@loader_path/.']): 43 if GetRpaths('My Framework.framework/My Framework') != ['@loader_path/.']:
44 test.fail_test() 44 test.fail_test()
45 45
46 if (GetRpaths('executable') != ['@executable_path/.']): 46 if GetRpaths('executable') != ['@executable_path/.']:
47 test.fail_test() 47 test.fail_test()
48 48
49 test.pass_test() 49 test.pass_test()
OLDNEW
« no previous file with comments | « test/lib/TestWin.py ('k') | test/msvs/buildevents/gyptest-ninja-warnings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698