未验证 提交 1262614f 编写于 作者: A Amador Pahim

Merge branch 'ldoktor-fix-variants-mux-path'

Signed-off-by: NAmador Pahim <apahim@redhat.com>
...@@ -631,4 +631,4 @@ class Varianter(object): ...@@ -631,4 +631,4 @@ class Varianter(object):
else: # No variants, use template else: # No variants, use template
yield {"variant": self._default_params.get_leaves(), yield {"variant": self._default_params.get_leaves(),
"variant_id": None, "variant_id": None,
"mux_path": "/run"} "mux_path": ["/run/*"]}
...@@ -189,6 +189,11 @@ class RunnerOperationTest(unittest.TestCase): ...@@ -189,6 +189,11 @@ class RunnerOperationTest(unittest.TestCase):
cmd_line = ('%s run --sysinfo=off --job-results-dir %s ' cmd_line = ('%s run --sysinfo=off --job-results-dir %s '
'passtest.py passtest.py' % (AVOCADO, self.tmpdir)) 'passtest.py passtest.py' % (AVOCADO, self.tmpdir))
process.run(cmd_line) process.run(cmd_line)
# Also check whether jobdata contains correct mux_path
variants = open(os.path.join(self.tmpdir, "latest", "jobdata",
"variants.json")).read()
self.assertIn('["/run/*"]', variants, "mux_path stored in jobdata "
"does not contains [\"/run/*\"]\n%s" % variants)
def test_runner_failfast(self): def test_runner_failfast(self):
os.chdir(basedir) os.chdir(basedir)
......
...@@ -78,13 +78,25 @@ class MultiplexTests(unittest.TestCase): ...@@ -78,13 +78,25 @@ class MultiplexTests(unittest.TestCase):
% (AVOCADO, self.tmpdir)) % (AVOCADO, self.tmpdir))
expected_rc = exit_codes.AVOCADO_ALL_OK expected_rc = exit_codes.AVOCADO_ALL_OK
self.run_and_check(cmd_line, expected_rc, (4, 0)) self.run_and_check(cmd_line, expected_rc, (4, 0))
# Also check whether jobdata contains correct mux_path
variants = open(os.path.join(self.tmpdir, "latest", "jobdata",
"variants.json")).read()
self.assertIn('["/run/*"]', variants, "mux_path stored in jobdata "
"does not contains [\"/run/*\"]\n%s" % variants)
def test_run_mplex_doublepass(self): def test_run_mplex_doublepass(self):
cmd_line = ('%s run --job-results-dir %s --sysinfo=off ' cmd_line = ('%s run --job-results-dir %s --sysinfo=off '
'passtest.py passtest.py -m ' 'passtest.py passtest.py -m '
'examples/tests/sleeptest.py.data/sleeptest.yaml' 'examples/tests/sleeptest.py.data/sleeptest.yaml '
'--mux-path /foo/\\* /bar/\\* /baz/\\*'
% (AVOCADO, self.tmpdir)) % (AVOCADO, self.tmpdir))
self.run_and_check(cmd_line, exit_codes.AVOCADO_ALL_OK, (8, 0)) self.run_and_check(cmd_line, exit_codes.AVOCADO_ALL_OK, (8, 0))
# Also check whether jobdata contains correct mux_path
variants = open(os.path.join(self.tmpdir, "latest", "jobdata",
"variants.json")).read()
exp = '["/foo/*", "/bar/*", "/baz/*"]'
self.assertIn(exp, variants, "mux_path stored in jobdata "
"does not contains %s\n%s" % (exp, variants))
def test_run_mplex_failtest(self): def test_run_mplex_failtest(self):
cmd_line = ('%s run --job-results-dir %s --sysinfo=off ' cmd_line = ('%s run --job-results-dir %s --sysinfo=off '
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册