From ce17265e96c6ca111c39561c2510db24ea229573 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Mon, 13 Jan 2020 20:22:02 +0000 Subject: [PATCH] Bug 1608831 - Use a distinct profile category for geckoview-junit tests; r=snorp Historically, mochitest and geckoview-junit tests have used the same profile. This patch splits out a separate profile type for geckoview-junit, with exactly the same content for now; the geckoview team can follow-up with whatever profile changes are required for junit. Differential Revision: https://phabricator.services.mozilla.com/D59775 --HG-- extra : moz-landing-system : lando --- testing/mochitest/runjunit.py | 2 +- testing/mochitest/runtests.py | 6 +++--- testing/profiles/profiles.json | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/testing/mochitest/runjunit.py b/testing/mochitest/runjunit.py index a463690c9505..f9e672351759 100644 --- a/testing/mochitest/runjunit.py +++ b/testing/mochitest/runjunit.py @@ -118,7 +118,7 @@ class JUnitTestRunner(MochitestDesktop): self.options.profilePath = self.profile.profile # Set preferences - self.merge_base_profiles(self.options) + self.merge_base_profiles(self.options, 'geckoview-junit') if self.fillCertificateDB(self.options): self.log.error("Certificate integration failed") diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 1930648ada97..b2928f65a7ee 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1849,7 +1849,7 @@ toolbar#nav-bar { 'ws': options.sslPort, } - def merge_base_profiles(self, options): + def merge_base_profiles(self, options, category): """Merge extra profile data from testing/profiles.""" profile_data_dir = os.path.join(SCRIPT_DIR, 'profile_data') @@ -1862,7 +1862,7 @@ toolbar#nav-bar { profile_data_dir = path with open(os.path.join(profile_data_dir, 'profiles.json'), 'r') as fh: - base_profiles = json.load(fh)['mochitest'] + base_profiles = json.load(fh)[category] # values to use when interpolating preferences interpolation = { @@ -1915,7 +1915,7 @@ toolbar#nav-bar { # 3) Prefs from --setpref # Prefs from base profiles - self.merge_base_profiles(options) + self.merge_base_profiles(options, 'mochitest') # Hardcoded prefs (TODO move these into a base profile) prefs = { diff --git a/testing/profiles/profiles.json b/testing/profiles/profiles.json index eedf1df851ab..9596259aacd2 100644 --- a/testing/profiles/profiles.json +++ b/testing/profiles/profiles.json @@ -1,4 +1,5 @@ { + "geckoview-junit": ["base", "common", "unittest-required", "unittest-features"], "mochitest": ["base", "common", "unittest-required", "unittest-features"], "profileserver": ["base", "common", "unittest-required", "unittest-features", "profileserver"], "raptor": ["base", "common", "perf", "raptor"],