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

Side by Side Diff: native_client_sdk/src/build_tools/tests/set_nacl_env_test.py

Issue 8885015: Fixed set_nacl_env_test for changes to utf8 conversion in ppapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/tests/set_nacl_env_test_archive/Makefile » ('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 (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 The Native Client 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 """Unit tests for set_nacl_env.py.""" 6 """Unit tests for set_nacl_env.py."""
7 7
8 import glob 8 import glob
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 # Can't use make on Windows 86 # Can't use make on Windows
87 if sys.platform == 'win32': 87 if sys.platform == 'win32':
88 return 88 return
89 89
90 # The test directories are not generally writable. To be able to run make, 90 # The test directories are not generally writable. To be able to run make,
91 # we copy the files to a temp directory instead. 91 # we copy the files to a temp directory instead.
92 self.assertTrue(self._temp_dir) 92 self.assertTrue(self._temp_dir)
93 src_dir = os.path.join(SCRIPT_DIR, 'set_nacl_env_test_archive') 93 src_dir = os.path.join(SCRIPT_DIR, 'set_nacl_env_test_archive')
94 for file in glob.iglob(os.path.join(src_dir, '*')): 94 for file in glob.iglob(os.path.join(src_dir, '*')):
95 shutil.copy2(file, self._temp_dir) 95 shutil.copy2(file, self._temp_dir)
96 shutil.copy2(os.path.join(SDK_ROOT_DIR, 'examples', 'hello_world_c',
97 'hello_world_c.c'),
98 self._temp_dir)
96 99
97 script = os.path.join(SDK_ROOT_DIR, 'build_tools', 'sdk_tools', 100 script = os.path.join(SDK_ROOT_DIR, 'build_tools', 'sdk_tools',
98 'set_nacl_env.py') 101 'set_nacl_env.py')
99 nexe_path = os.path.join(self._temp_dir, 'hello_world_c.nexe') 102 nexe_path = os.path.join(self._temp_dir, 'hello_world_c.nexe')
100 103
101 # Build and verify the 32-bit version. 104 # Build and verify the 32-bit version.
102 options = ['--platform=.', '--arch=x86-32'] 105 options = ['--platform=.', '--arch=x86-32']
103 cmd = [script] + options + ['make hello_world_c.nexe'] 106 cmd = [script] + options + ['make hello_world_c.nexe']
104 self.assertEqual(0, subprocess.call(cmd, env=self._env, shell=False, 107 self.assertEqual(0, subprocess.call(cmd, env=self._env, shell=False,
105 cwd=self._temp_dir)) 108 cwd=self._temp_dir))
(...skipping 16 matching lines...) Expand all
122 125
123 def main(): 126 def main():
124 suite = unittest.TestLoader().loadTestsFromTestCase(TestSetNaclEnv) 127 suite = unittest.TestLoader().loadTestsFromTestCase(TestSetNaclEnv)
125 result = unittest.TextTestRunner(verbosity=2).run(suite) 128 result = unittest.TextTestRunner(verbosity=2).run(suite)
126 129
127 return int(not result.wasSuccessful()) 130 return int(not result.wasSuccessful())
128 131
129 132
130 if __name__ == '__main__': 133 if __name__ == '__main__':
131 sys.exit(main()) 134 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/tests/set_nacl_env_test_archive/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698