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

Unified Diff: build/android/pylib/utils/test_environment.py

Issue 2198613002: [Android] Get rid of old perf test runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get rid of test_env Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/perf/test_runner.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/test_environment.py
diff --git a/build/android/pylib/utils/test_environment.py b/build/android/pylib/utils/test_environment.py
deleted file mode 100644
index 36563c6be25cf967f3388bb70a18a44518d68962..0000000000000000000000000000000000000000
--- a/build/android/pylib/utils/test_environment.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-import psutil
-import signal
-
-from devil.android import device_errors
-from devil.android import device_utils
-
-
-def _KillWebServers():
- for s in [signal.SIGTERM, signal.SIGINT, signal.SIGQUIT, signal.SIGKILL]:
- signalled = []
- for server in ['lighttpd', 'webpagereplay']:
- for p in psutil.process_iter():
- try:
- if not server in ' '.join(p.cmdline):
- continue
- logging.info('Killing %s %s %s', s, server, p.pid)
- p.send_signal(s)
- signalled.append(p)
- except Exception: # pylint: disable=broad-except
- logging.exception('Failed killing %s %s', server, p.pid)
- for p in signalled:
- try:
- p.wait(1)
- except Exception: # pylint: disable=broad-except
- logging.exception('Failed waiting for %s to die.', p.pid)
-
-
-def CleanupLeftoverProcesses(devices):
- """Clean up the test environment, restarting fresh adb and HTTP daemons.
-
- Args:
- devices: The devices to clean.
- """
- _KillWebServers()
- device_utils.RestartServer()
-
- def cleanup_device(d):
- try:
- d.WaitUntilFullyBooted()
- d.RestartAdbd()
- d.EnableRoot()
- d.WaitUntilFullyBooted()
- except (device_errors.CommandFailedError,
- device_errors.CommandTimeoutError):
- logging.exception('Failed to clean up device. Attempting to continue.')
-
- device_utils.DeviceUtils.parallel(devices).pMap(cleanup_device)
-
« no previous file with comments | « build/android/pylib/perf/test_runner.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698