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

Side by Side Diff: build/android/pylib/test_package_executable.py

Issue 11183025: Use third_party/pexpect in android pylib (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak Created 8 years, 2 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 | « build/android/pylib/test_package_apk.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import pexpect
9 import shutil 8 import shutil
10 import sys 9 import sys
11 import tempfile 10 import tempfile
12 11
13 import cmd_helper 12 import cmd_helper
14 import constants 13 import constants
15 from test_package import TestPackage 14 from test_package import TestPackage
15 from pylib import pexpect
16 16
17 17
18 class TestPackageExecutable(TestPackage): 18 class TestPackageExecutable(TestPackage):
19 """A helper class for running stand-alone executables.""" 19 """A helper class for running stand-alone executables."""
20 20
21 _TEST_RUNNER_RET_VAL_FILE = 'gtest_retval' 21 _TEST_RUNNER_RET_VAL_FILE = 'gtest_retval'
22 22
23 def __init__(self, adb, device, test_suite, timeout, rebaseline, 23 def __init__(self, adb, device, test_suite, timeout, rebaseline,
24 performance_test, cleanup_test_files, tool, dump_debug_info, 24 performance_test, cleanup_test_files, tool, dump_debug_info,
25 symbols_dir=None): 25 symbols_dir=None):
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 os.makedirs(self.symbols_dir) 158 os.makedirs(self.symbols_dir)
159 shutil.copy(self.test_suite, self.symbols_dir) 159 shutil.copy(self.test_suite, self.symbols_dir)
160 strip = os.environ['STRIP'] 160 strip = os.environ['STRIP']
161 cmd_helper.RunCmd([strip, self.test_suite, '-o', target_name]) 161 cmd_helper.RunCmd([strip, self.test_suite, '-o', target_name])
162 test_binary = constants.TEST_EXECUTABLE_DIR + '/' + self.test_suite_basename 162 test_binary = constants.TEST_EXECUTABLE_DIR + '/' + self.test_suite_basename
163 self.adb.PushIfNeeded(target_name, test_binary) 163 self.adb.PushIfNeeded(target_name, test_binary)
164 164
165 def _GetTestSuiteBaseName(self): 165 def _GetTestSuiteBaseName(self):
166 """Returns the base name of the test suite.""" 166 """Returns the base name of the test suite."""
167 return os.path.basename(self.test_suite) 167 return os.path.basename(self.test_suite)
OLDNEW
« no previous file with comments | « build/android/pylib/test_package_apk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698