提交 bc071194 编写于 作者: L Lukáš Doktor

jobdata: Rename the variants file

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: NLukáš Doktor <ldoktor@redhat.com>
上级 97e86f09
......@@ -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:
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册