From: Josh Durgin Date: Mon, 7 Mar 2022 18:34:36 +0000 (+0000) Subject: run: make fetching tasks work for non-scheduled jobs X-Git-Tag: 1.2.0~198^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d2f94c149da64617a89358d9c2f0164fc2d78aa4;p=teuthology.git run: make fetching tasks work for non-scheduled jobs The qa path should be the default (just like it's set by teuthology-suite), and we actually need to do the import to access the tasks. Signed-off-by: Josh Durgin --- diff --git a/teuthology/run.py b/teuthology/run.py index 37fb42b60..ceccfd8f6 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -88,7 +88,7 @@ def fetch_tasks_if_needed(job_config): suite_sha1 = job_config.get('suite_sha1') suite_path = os.path.normpath(os.path.join( fetch_qa_suite(suite_branch, commit=suite_sha1), - job_config.get('suite_relpath', ''), + job_config.get('suite_relpath', 'qa'), )) sys.path.insert(1, suite_path) return suite_path diff --git a/teuthology/test/test_run.py b/teuthology/test/test_run.py index f08082f58..09ed9516e 100644 --- a/teuthology/test/test_run.py +++ b/teuthology/test/test_run.py @@ -115,7 +115,7 @@ class TestRun(object): m_fetch_qa_suite.return_value = "/some/other/suite/path" result = run.fetch_tasks_if_needed(config) m_fetch_qa_suite.assert_called_with("feature_branch", commit="commit") - assert result == "/some/other/suite/path" + assert result == "/some/other/suite/path/qa" @patch("teuthology.run.get_status") @patch("teuthology.run.nuke")