avocado.core.remote.runner: Fix incorrect test link in the HTML report

It turns out we were basing the links of the URL report
in the 'url' attribute, when we should be using 'test'.
This fixes an issue that came up with the new multiplexed
tests in VM and remote plugins, where the HTML report
link was invalid. Fix the unittest, that had the wrong
behavior built into it.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 b909d212
......@@ -114,7 +114,7 @@ class RemoteTestRunner(TestRunner):
for t_dict in json_result['tests']:
logdir = os.path.dirname(self.result.stream.debuglog)
logdir = os.path.join(logdir, 'test-results')
relative_path = t_dict['url'].lstrip('/')
relative_path = t_dict['test'].lstrip('/')
logdir = os.path.join(logdir, relative_path)
t_dict['logdir'] = logdir
t_dict['logfile'] = os.path.join(logdir, 'debug.log')
......
......@@ -98,8 +98,8 @@ _=/usr/bin/env''', exit_status=0)
'tagged_name': u'sleeptest.1', 'time_elapsed': 1.23,
'fail_class': 'Not supported yet', 'job_unique_id': '',
'fail_reason': 'None',
'logdir': '/local/path/test-results/sleeptest',
'logfile': '/local/path/test-results/sleeptest/debug.log'}
'logdir': '/local/path/test-results/sleeptest.1',
'logfile': '/local/path/test-results/sleeptest.1/debug.log'}
Results.should_receive('start_test').once().with_args(args).ordered()
Results.should_receive('check_test').once().with_args(args).ordered()
(Remote.should_receive('receive_files')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册