[GTS] Add authkey to public runs of GTS
Android now requires an authkey add it to the test
BUG=b:112515274
TEST=manual patch on a moblab
Change-Id: Idd4f6cceaf548ec5a88f48b2efa29934e84acddc
Reviewed-on: https://chromium-review.googlesource.com/1177002
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
diff --git a/server/site_tests/cheets_GTS/cheets_GTS.py b/server/site_tests/cheets_GTS/cheets_GTS.py
index f3ca7e8..bbdc65c 100644
--- a/server/site_tests/cheets_GTS/cheets_GTS.py
+++ b/server/site_tests/cheets_GTS/cheets_GTS.py
@@ -21,7 +21,9 @@
# Maximum default time allowed for each individual GTS module.
_GTS_TIMEOUT_SECONDS = 3600
-_PARTNER_GTS_LOCATION = 'gs://chromeos-partner-gts/gts-6.0_r1-4868992.zip'
+_PARTNER_GTS_BUCKET = 'gs://chromeos-partner-gts/'
+_PARTNER_GTS_LOCATION = _PARTNER_GTS_BUCKET + 'gts-6.0_r1-4868992.zip'
+_PARTNER_GTS_AUTHKEY = _PARTNER_GTS_BUCKET + 'gts-arc.json'
class cheets_GTS(tradefed_test.TradefedTest):
@@ -52,6 +54,9 @@
def _get_default_bundle_url(self, bundle):
return _PARTNER_GTS_LOCATION
+ def _get_default_authkey(self):
+ return _PARTNER_GTS_AUTHKEY
+
def _get_tradefed_base_dir(self):
return 'android-gts'
@@ -138,9 +143,10 @@
# Download the GTS auth key to the local temp directory.
self._authkey = None
- if authkey:
- tmpdir = tempfile.mkdtemp()
- self._authkey = self._download_to_dir(authkey, tmpdir)
+ if not authkey:
+ authkey = self._get_default_authkey()
+ tmpdir = tempfile.mkdtemp()
+ self._authkey = self._download_to_dir(authkey, tmpdir)
# On dev and beta channels timeouts are sharp, lenient on stable.
self._timeout = timeout