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

Side by Side Diff: native_client_sdk/src/tools/lib/tests/get_shared_deps_test.py

Issue 229283003: Applied changes to chromium tree for new NaCl toolchain directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | native_client_sdk/src/tools/tests/create_nmf_test.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 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import shutil 7 import shutil
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 25 matching lines...) Expand all
36 if '.so.' in name: 36 if '.so.' in name:
37 name = name.rsplit('.', 1)[0] 37 name = name.rsplit('.', 1)[0]
38 names.append(name) 38 names.append(name)
39 return names 39 return names
40 40
41 41
42 class TestGetNeeded(unittest.TestCase): 42 class TestGetNeeded(unittest.TestCase):
43 def setUp(self): 43 def setUp(self):
44 self.tempdir = None 44 self.tempdir = None
45 toolchain = os.path.join(CHROME_SRC, 'native_client', 'toolchain') 45 toolchain = os.path.join(CHROME_SRC, 'native_client', 'toolchain')
46 self.toolchain = os.path.join(toolchain, '%s_x86' % getos.GetPlatform()) 46 self.toolchain = os.path.join(toolchain, '%s_x86' % getos.GetPlatform(),
47 'nacl_x86_glibc')
47 self.objdump = os.path.join(self.toolchain, 'bin', 'i686-nacl-objdump') 48 self.objdump = os.path.join(self.toolchain, 'bin', 'i686-nacl-objdump')
48 if os.name == 'nt': 49 if os.name == 'nt':
49 self.objdump += '.exe' 50 self.objdump += '.exe'
50 self.Mktemp() 51 self.Mktemp()
51 self.dyn_nexe = self.createTestNexe('test_dynamic_x86_32.nexe', 'i686') 52 self.dyn_nexe = self.createTestNexe('test_dynamic_x86_32.nexe', 'i686')
52 self.dyn_deps = set(['libc.so', 'runnable-ld.so', 53 self.dyn_deps = set(['libc.so', 'runnable-ld.so',
53 'libgcc_s.so', 'libpthread.so']) 54 'libgcc_s.so', 'libpthread.so'])
54 55
55 def tearDown(self): 56 def tearDown(self):
56 if self.tempdir: 57 if self.tempdir:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 needed = get_shared_deps.GetNeeded([self.dyn_nexe], 128 needed = get_shared_deps.GetNeeded([self.dyn_nexe],
128 lib_path=lib_path, 129 lib_path=lib_path,
129 objdump=self.objdump) 130 objdump=self.objdump)
130 for arch in needed.itervalues(): 131 for arch in needed.itervalues():
131 self.assertEqual(arch, 'x86-32') 132 self.assertEqual(arch, 'x86-32')
132 133
133 134
134 if __name__ == '__main__': 135 if __name__ == '__main__':
135 unittest.main() 136 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/tools/tests/create_nmf_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698