Bug 1455407: [releaserunner3] Check appropriate path for version thunderbird version information; r=aki
authorTom Prince <mozilla@hocat.ca>
Fri, 25 May 2018 22:40:01 +0000
changeset 8415 6c6019908ae6
parent 8414 74a7df6d3fc5
child 8416 9bfd3ee2eed3
push id6143
push usermozilla@hocat.ca
push date2018-05-25 22:51 +0000
reviewersaki
bugs1455407
Bug 1455407: [releaserunner3] Check appropriate path for version thunderbird version information; r=aki Differential Revision: https://phabricator.services.mozilla.com/D1410
lib/python/kickoff/sanity/revisions.py
--- a/lib/python/kickoff/sanity/revisions.py
+++ b/lib/python/kickoff/sanity/revisions.py
@@ -2,23 +2,29 @@ import sys
 import logging
 import requests
 
 from kickoff.sanity.base import ReleaseSanitizerTestSuite, ReleaseSanitizerRunner, make_generic_get_request, \
                                 make_generic_head_request, make_hg_get_request
 
 log = logging.getLogger(__name__)
 
-VERSION_DISPLAY_CONFIG_URI = "browser/config/version_display.txt"
+VERSION_DISPLAY_CONFIG_URI = {
+    "fennec": "browser/config/version_display.txt",
+    "firefox": "browser/config/version_display.txt",
+    "devedition": "browser/config/version_display.txt",
+    "thunderbird": "mail/config/version_display.txt",
+}
 
 
 class RevisionsTestSuite(ReleaseSanitizerTestSuite):
     def __init__(self, **kwargs):
         ReleaseSanitizerTestSuite.__init__(self, **kwargs)
         self.version = self.kwargs['version']
+        self.product = self.kwargs['product']
 
     def test_versions_repo_and_revision_check(self, result):
         """test_versions method
         Tests if the indicated branch and revision repo exists
         """
         log.info("Testing repo and revision in tree ...")
         try:
             make_hg_get_request(self.repo_path, self.revision).strip()
@@ -32,18 +38,20 @@ class RevisionsTestSuite(ReleaseSanitize
         Tests if the upstream display version exists and if it is the same
         with the current one coming from release runner
         """
         log.info("Testing version display validation in tree ...")
         # esr-hack: ensure trimming the suffix before comparing
         version = self.version.replace("esr", "")
 
         try:
-            display_version = make_hg_get_request(self.repo_path, self.revision,
-                                                  filename=VERSION_DISPLAY_CONFIG_URI).strip()
+            display_version = make_hg_get_request(
+                self.repo_path, self.revision,
+                filename=VERSION_DISPLAY_CONFIG_URI[self.product],
+            ).strip()
         except requests.HTTPError as err:
             err_msg = ("display_version config file not found in {path} under"
                        " {rev} revision. URL: {url}").format(
                            path=self.repo_path,
                            rev=self.revision,
                            url=err.request.url)
             result.add_error(err_msg, sys.exc_info())
             return