diff options
author | csharp <csharp@chromium.org> | 2015-08-13 09:50:38 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-13 16:51:28 +0000 |
commit | b0e8b5904780100ed6793e4cca9215e3c453b857 (patch) | |
tree | beb3f40b0f2503721cfa565dca6d6e565d6ca41d /tools/cygprofile | |
parent | 7950c3f9e4c82629208702eaca4719742880245e (diff) | |
download | chromium_src-b0e8b5904780100ed6793e4cca9215e3c453b857.zip chromium_src-b0e8b5904780100ed6793e4cca9215e3c453b857.tar.gz chromium_src-b0e8b5904780100ed6793e4cca9215e3c453b857.tar.bz2 |
Revert of [Android] Remove android_commands and android_testrunner. (patchset #3 id:40001 of https://codereview.chromium.org/1290773009/ )
Reason for revert:
This seems to have broken the Google Chrome Linux x64 build
Output:
FAILED: cd ../../content; python ../tools/isolate_driver.py check --isolated "../out/Release/telemetry_gpu_unittests.isolated" --isolate "telemetry_gpu_unittests.isolate" --path-variable DEPTH .. --path-variable PRODUCT_DIR "../out/Release " --extra-variable "version_full=46.0.2482.0" --config-variable "CONFIGURATION_NAME=Release" --config-variable "OS=linux" --config-variable "asan=0" --config-variable "branding=Chrome" --config-variable "chromeos=0" --config-variable "component=static_library" --config-variable "disable_nacl=0" --config-variable "enable_pepper_cdms=1" --config-variable "enable_plugins=1" --config-variable "fastbuild=0" --config-variable "icu_use_data_file_flag=1" --config-variable "internal_gles2_conform_tests=0" --config-variable "kasko=0" --config-variable "libpeer_target_type=static_library" --config-variable "lsan=0" --config-variable "msan=0" --config-variable "target_arch=x64" --config-variable "tsan=0" --config-variable "use_custom_libcxx=0" --config-variable "use_instrumented_libraries=0" --config-variable "use_prebuilt_instrumented_libraries=0" --config-variable "use_openssl=1" --config-variable "use_ozone=0" --config-variable "use_x11=1" --config-variable "v8_use_external_startup_data=1"
Failed to find an input file: /b/build/slave/google-chrome-rel-linux_64/build/src/third_party/android_testrunner/ is not a directory but ends with "/"
Original issue's description:
> [Android] Remove android_commands and android_testrunner.
>
> Good riddance.
>
> BUG=267773
>
> Committed: https://crrev.com/d71baced2e55f9f102189c490908e3c631a790e2
> Cr-Commit-Position: refs/heads/master@{#343210}
TBR=craigdh@chromium.org,nednguyen@google.com,perezju@chromium.org,sullivan@chromium.org,thakis@chromium.org,jbudorick@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=267773
Review URL: https://codereview.chromium.org/1288993002
Cr-Commit-Position: refs/heads/master@{#343219}
Diffstat (limited to 'tools/cygprofile')
-rw-r--r-- | tools/cygprofile/profile_android_startup.py | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/tools/cygprofile/profile_android_startup.py b/tools/cygprofile/profile_android_startup.py index 29fad74..9e49bef 100644 --- a/tools/cygprofile/profile_android_startup.py +++ b/tools/cygprofile/profile_android_startup.py @@ -218,15 +218,12 @@ class AndroidProfileTool(object): The exit code for the tests. """ device_path = '/data/local/tmp/cygprofile_unittests' - self._device.PushChangedFiles([(self._cygprofile_tests, device_path)]) - try: - self._device.RunShellCommand(device_path, check_return=True) - except device_errors.CommandFailedError: - # TODO(jbudorick): Let the exception propagate up once clients can - # handle it. - logging.exception('Failure while running cygprofile_unittests:') - return 1 - return 0 + self._device.old_interface.PushIfNeeded( + self._cygprofile_tests, device_path) + (exit_code, _) = ( + self._device.old_interface.GetShellCommandStatusAndOutput( + command=device_path, log_result=True)) + return exit_code def CollectProfile(self, apk, package_info): """Run a profile and collect the log files. @@ -240,7 +237,8 @@ class AndroidProfileTool(object): Raises: NoCyglogDataError: No data was found on the device. """ - self._Install(apk) + self._Install(apk, package_info) + try: changer = self._SetChromeFlags(package_info) self._SetUpDeviceFolders() @@ -268,7 +266,7 @@ class AndroidProfileTool(object): self._DeleteDeviceData() self._DeleteHostData() - def _Install(self, apk): + def _Install(self, apk, package_info): """Installs Chrome.apk on the device. Args: apk: The location of the chrome apk to profile. @@ -276,7 +274,7 @@ class AndroidProfileTool(object): as from pylib/constants. """ print 'Installing apk...' - self._device.Install(apk) + self._device.old_interface.ManagedInstall(apk, package_info.package) def _SetUpDevice(self): """When profiling, files are output to the disk by every process. This @@ -289,7 +287,7 @@ class AndroidProfileTool(object): # SELinux need to be in permissive mode, otherwise the process cannot # write the log files. print 'Putting SELinux in permissive mode...' - self._device.RunShellCommand(['setenforce' '0'], check_return=True) + self._device.old_interface.RunShellCommand('setenforce 0') except device_errors.CommandFailedError as e: # TODO(jbudorick) Handle this exception appropriately once interface # conversions are finished. @@ -311,15 +309,13 @@ class AndroidProfileTool(object): """Creates folders on the device to store cyglog data. """ print 'Setting up device folders...' self._DeleteDeviceData() - self._device.RunShellCommand( - ['mkdir', '-p', str(self._DEVICE_CYGLOG_DIR)], - check_return=True) + self._device.old_interface.RunShellCommand( + 'mkdir -p %s' % self._DEVICE_CYGLOG_DIR) def _DeleteDeviceData(self): """Clears out cyglog storage locations on the device. """ - self._device.RunShellCommand( - ['rm', '-rf', str(self._DEVICE_CYGLOG_DIR)], - check_return=True) + self._device.old_interface.RunShellCommand( + 'rm -rf %s' % self._DEVICE_CYGLOG_DIR) def _StartChrome(self, package_info, url): print 'Launching chrome...' @@ -351,7 +347,7 @@ class AndroidProfileTool(object): """ print 'Pulling cyglog data...' self._SetUpHostFolders() - self._device.PullFile( + self._device.old_interface.Adb().Pull( self._DEVICE_CYGLOG_DIR, self._host_cyglog_dir) files = os.listdir(self._host_cyglog_dir) |