diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
commit | a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431 (patch) | |
tree | 54617b4f5f04ee87a2c9e3b97cc88b8626859124 /tools/tryselect/test/test_mozharness_integration.py | |
parent | Releasing progress-linux version 115.7.0esr-1~deb12u1progress7u1. (diff) | |
download | firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.tar.xz firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.zip |
Merging upstream version 115.8.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/tryselect/test/test_mozharness_integration.py')
-rw-r--r-- | tools/tryselect/test/test_mozharness_integration.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/tryselect/test/test_mozharness_integration.py b/tools/tryselect/test/test_mozharness_integration.py index 984f8de25b..abeaaf370e 100644 --- a/tools/tryselect/test/test_mozharness_integration.py +++ b/tools/tryselect/test/test_mozharness_integration.py @@ -2,12 +2,12 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -import imp import json import os import mozunit import pytest +from mozfile import load_source from tryselect.tasks import build, resolve_tests_by_suite MOZHARNESS_SCRIPTS = { @@ -55,10 +55,10 @@ uses). def get_mozharness_test_paths(name): - scriptdir = os.path.join(build.topsrcdir, "testing", "mozharness", "scripts") - - files = imp.find_module(name, [scriptdir]) - mod = imp.load_module("scripts.{}".format(name), *files) + scriptdir = os.path.join(build.topsrcdir, "testing", "mozharness") + mod = load_source( + "scripts." + name, os.path.join(scriptdir, "scripts", name + ".py") + ) class_name = MOZHARNESS_SCRIPTS[name]["class_name"] cls = getattr(mod, class_name) @@ -82,13 +82,15 @@ def all_suites(): def generate_suites_from_config(path): - configdir = os.path.join(build.topsrcdir, "testing", "mozharness", "configs") - parent, name = os.path.split(path) name = os.path.splitext(name)[0] - files = imp.find_module("{}".format(name), [os.path.join(configdir, parent)]) - mod = imp.load_module("config.{}".format(name), *files) + configdir = os.path.join( + build.topsrcdir, "testing", "mozharness", "configs", parent + ) + + mod = load_source(name, os.path.join(configdir, name + ".py")) + config = mod.config for category in sorted(config["suite_definitions"]): |