OLD | NEW |
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 """Defines TestPackageExecutable to help run stand-alone executables.""" | 5 """Defines TestPackageExecutable to help run stand-alone executables.""" |
6 | 6 |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import shutil | |
10 import sys | 9 import sys |
11 import tempfile | 10 import tempfile |
12 | 11 |
13 from pylib import cmd_helper | 12 from pylib import cmd_helper |
14 from pylib import constants | 13 from pylib import constants |
15 from pylib import pexpect | 14 from pylib import pexpect |
16 from pylib.gtest.test_package import TestPackage | 15 from pylib.gtest.test_package import TestPackage |
17 | 16 |
18 | 17 |
19 class TestPackageExecutable(TestPackage): | 18 class TestPackageExecutable(TestPackage): |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 if target_mtime < source_mtime: | 132 if target_mtime < source_mtime: |
134 logging.critical( | 133 logging.critical( |
135 'stripped binary (%s, timestamp %d) older than ' | 134 'stripped binary (%s, timestamp %d) older than ' |
136 'source binary (%s, timestamp %d), build target %s', | 135 'source binary (%s, timestamp %d), build target %s', |
137 target_name, target_mtime, self.suite_path, source_mtime, | 136 target_name, target_mtime, self.suite_path, source_mtime, |
138 self.suite_name + '_stripped') | 137 self.suite_name + '_stripped') |
139 sys.exit(1) | 138 sys.exit(1) |
140 | 139 |
141 test_binary = constants.TEST_EXECUTABLE_DIR + '/' + self.suite_name | 140 test_binary = constants.TEST_EXECUTABLE_DIR + '/' + self.suite_name |
142 adb.PushIfNeeded(target_name, test_binary) | 141 adb.PushIfNeeded(target_name, test_binary) |
OLD | NEW |