From bc071194c706ed7db32a4f30956683b629bc4bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Tue, 6 Jun 2017 17:54:48 +0200 Subject: [PATCH] jobdata: Rename the variants file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The variants file is called multiplex even though we changed the terminology long ago. Let's support both names for now and slowly move to the correct name. Signed-off-by: Lukáš Doktor --- avocado/core/jobdata.py | 6 +++++- selftests/functional/test_replay_basic.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/avocado/core/jobdata.py b/avocado/core/jobdata.py index ef5abd1f..40b7ff47 100644 --- a/avocado/core/jobdata.py +++ b/avocado/core/jobdata.py @@ -30,7 +30,9 @@ JOB_DATA_FALLBACK_DIR = 'replay' CONFIG_FILENAME = 'config' TEST_REFERENCES_FILENAME = 'test_references' TEST_REFERENCES_FILENAME_LEGACY = 'urls' -VARIANTS_FILENAME = 'multiplex' +VARIANTS_FILENAME = 'variants' +# TODO: Remove when 36lts is discontinued +VARIANTS_FILENAME_LEGACY = 'multiplex' PWD_FILENAME = 'pwd' ARGS_FILENAME = 'args' CMDLINE_FILENAME = 'cmdline' @@ -122,6 +124,8 @@ def retrieve_variants(resultsdir): Retrieves the job Mux object from the results directory. """ recorded_mux = _retrieve(resultsdir, VARIANTS_FILENAME) + if recorded_mux is None: + recorded_mux = _retrieve(resultsdir, VARIANTS_FILENAME_LEGACY) if recorded_mux is None: return None with open(recorded_mux, 'r') as mux_file: diff --git a/selftests/functional/test_replay_basic.py b/selftests/functional/test_replay_basic.py index 2db7a445..e3f4073a 100644 --- a/selftests/functional/test_replay_basic.py +++ b/selftests/functional/test_replay_basic.py @@ -60,7 +60,7 @@ class ReplayTests(unittest.TestCase): """ Checks if all expected files are there. """ - file_list = ['multiplex', 'config', 'test_references', 'pwd', 'args', + file_list = ['variants', 'config', 'test_references', 'pwd', 'args', 'cmdline'] for filename in file_list: path = os.path.join(self.jobdir, 'jobdata', filename) -- GitLab