Commit 038cbd2d authored by frankf@chromium.org's avatar frankf@chromium.org

[Android] Clear gtest app's data on tear down.

This also closes the app. If the app crashes in the background,
it might interfere with subsequent instrumentation tests.

BUG=271071
R=craigdh@chromium.org

Review URL: https://codereview.chromium.org/22767002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217065 0039d316-1c4b-4281-b951-d872f2087c98
parent b11b0a8d
......@@ -87,6 +87,12 @@ class TestPackageApk(TestPackage):
#override
def ClearApplicationState(self, adb):
adb.ClearApplicationState(self._test_apk_package_name)
# Content shell creates a profile on the sdscard which accumulates cache
# files over time.
if self.suite_name == 'content_browsertests':
adb.RunShellCommand(
'rm -r %s/content_shell' % adb.GetExternalStorage(),
timeout_time=60 * 2)
#override
def CreateCommandLineFileOnDevice(self, adb, test_filter, test_arguments):
......
......@@ -188,10 +188,6 @@ class TestRunner(base_test_runner.BaseTestRunner):
#override
def TearDown(self):
"""Cleans up the test enviroment for the test suite."""
# Content shell creates a profile on the sdscard which accumulates cache
# files over time.
self.adb.RunShellCommand('rm -r ' +
os.path.join(self.adb.GetExternalStorage(), 'content_shell'),
timeout_time=60 * 2)
self.test_package.ClearApplicationState(self.adb)
self.tool.CleanUpEnvironment()
super(TestRunner, self).TearDown()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment