Commit e479addc authored by Andrew Luo's avatar Andrew Luo Committed by Commit Bot

Uninstall webkit cts apks before running.

Bug: 934054
Test: run_cts.py --platform M -f android.webkit.cts.WebViewSslTest.testSecureServerRequestingClientCertDoesNotCancelRequest
Test: run_cts.py --platform N -f android.webkit.cts.WebViewSslTest.testSecureServerRequestingClientCertDoesNotCancelRequest
Change-Id: Ia4128fe82932719cc0336beb5b67eaae36978150
Reviewed-on: https://chromium-review.googlesource.com/c/1496252Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Commit-Queue: Andrew Luo <aluo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636843}
parent 3f20eab3
......@@ -43,6 +43,8 @@ _ARCH_SPECIFIC_CTS_INFO = ["filename", "unzip_dir", "_origin"]
_CTS_ARCHIVE_DIR = os.path.join(os.path.dirname(__file__), 'cts_archive')
_CTS_WEBKIT_PACKAGES = ["com.android.cts.webkit", "android.webkit.cts"]
SDK_PLATFORM_DICT = {
version_codes.LOLLIPOP: 'L',
version_codes.LOLLIPOP_MR1: 'L',
......@@ -313,6 +315,11 @@ def DetermineArch(device):
return arch
def UninstallAnyCtsWebkitPackages(device):
for package in _CTS_WEBKIT_PACKAGES:
device.Uninstall(package)
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
......@@ -389,6 +396,13 @@ def main():
+ cts_release + ' must be one of: '
+ ', '.join(platform_modules))
# Need to uninstall all previous cts webkit packages so that the
# MockContentProvider names won't conflict with a previously installed
# one under a different package name. This is due to CtsWebkitTestCases's
# package name change from M to N versions of the tests while keeping the
# MockContentProvider's authority string the same.
UninstallAnyCtsWebkitPackages(device)
return RunAllCTSTests(args, arch, cts_release, test_runner_args)
......
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