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

Side by Side Diff: native_client_sdk/src/tools/tests/create_nmf_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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 import json 5 import json
6 import os 6 import os
7 import posixpath 7 import posixpath
8 import shutil 8 import shutil
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 self.assertTrue(any(os.path.join('ports', 'lib') in p for p in paths), 77 self.assertTrue(any(os.path.join('ports', 'lib') in p for p in paths),
78 "naclports libpath missing: %s" % str(paths)) 78 "naclports libpath missing: %s" % str(paths))
79 79
80 80
81 class TestNmfUtils(unittest.TestCase): 81 class TestNmfUtils(unittest.TestCase):
82 """Tests for the main NmfUtils class in create_nmf.""" 82 """Tests for the main NmfUtils class in create_nmf."""
83 83
84 def setUp(self): 84 def setUp(self):
85 self.tempdir = None 85 self.tempdir = None
86 toolchain = os.path.join(CHROME_SRC, 'native_client', 'toolchain') 86 toolchain = os.path.join(CHROME_SRC, 'native_client', 'toolchain')
87 self.toolchain = os.path.join(toolchain, '%s_x86' % getos.GetPlatform()) 87 self.toolchain = os.path.join(toolchain, '%s_x86' % getos.GetPlatform(),
88 'nacl_x86_glibc')
88 self.objdump = os.path.join(self.toolchain, 'bin', 'i686-nacl-objdump') 89 self.objdump = os.path.join(self.toolchain, 'bin', 'i686-nacl-objdump')
89 if os.name == 'nt': 90 if os.name == 'nt':
90 self.objdump += '.exe' 91 self.objdump += '.exe'
91 self._Mktemp() 92 self._Mktemp()
92 93
93 def _CreateTestNexe(self, name, arch): 94 def _CreateTestNexe(self, name, arch):
94 """Create an empty test .nexe file for use in create_nmf tests. 95 """Create an empty test .nexe file for use in create_nmf tests.
95 96
96 This is used rather than checking in test binaries since the 97 This is used rather than checking in test binaries since the
97 checked in binaries depend on .so files that only exist in the 98 checked in binaries depend on .so files that only exist in the
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 'optlevel': 0, 594 'optlevel': 0,
594 } 595 }
595 } 596 }
596 } 597 }
597 } 598 }
598 self.assertManifestEquals(nmf, expected_manifest) 599 self.assertManifestEquals(nmf, expected_manifest)
599 600
600 601
601 if __name__ == '__main__': 602 if __name__ == '__main__':
602 unittest.main() 603 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698