diff --git a/avocado/core/test.py b/avocado/core/test.py index 74ce57ed14ba32eed0d1ae71ab8039cecf8131f0..9a16d0b3fdf8342d716a6b95046e852162f7be64 100644 --- a/avocado/core/test.py +++ b/avocado/core/test.py @@ -60,7 +60,7 @@ TEST_STATE_ATTRIBUTES = ('name', 'logdir', 'logfile', 'status', 'running', 'paused', 'time_start', 'time_elapsed', 'time_end', 'fail_reason', 'fail_class', 'traceback', - 'params', 'timeout', 'whiteboard') + 'timeout', 'whiteboard') class RawFileHandler(logging.FileHandler): @@ -630,6 +630,9 @@ class Test(unittest.TestCase, TestData): state['class_name'] = self.__class__.__name__ state['job_logdir'] = self.job.logdir state['job_unique_id'] = self.job.unique_id + state['params'] = [(path, key, value) + for path, key, value + in self.params.iteritems()] return state def _register_log_file_handler(self, logger, formatter, filename, diff --git a/optional_plugins/html/avocado_result_html/__init__.py b/optional_plugins/html/avocado_result_html/__init__.py index 9da633f6ccc586452654a92cc0ca468ebc3c3517..f7a9e8705c609814cb9291d5f302dab43d54bb18 100644 --- a/optional_plugins/html/avocado_result_html/__init__.py +++ b/optional_plugins/html/avocado_result_html/__init__.py @@ -129,7 +129,7 @@ class ReportModel(object): params = '' try: parameters = 'Params:\n' - for path, key, value in tst['params'].iteritems(): + for path, key, value in tst['params']: parameters += ' %s:%s => %s\n' % (path, key, value) except KeyError: pass diff --git a/optional_plugins/resultsdb/avocado_resultsdb/__init__.py b/optional_plugins/resultsdb/avocado_resultsdb/__init__.py index d048bd566e6056e06d9eda5dffcf877701403742..34bc2caa2484cfa2325caf3cdb1fe43381553ee4 100644 --- a/optional_plugins/resultsdb/avocado_resultsdb/__init__.py +++ b/optional_plugins/resultsdb/avocado_resultsdb/__init__.py @@ -114,9 +114,8 @@ class ResultsdbResultEvent(ResultEvents): 'status': state['status']} params = {} - for param in iteritems(state['params']): - params['param %s' % param[1]] = '%s (path: %s)' % (param[2], - param[0]) + for path, key, value in state['params']: + params['param %s' % key] = '%s (path: %s)' % (value, path) data.update(params) self.rdbapi.create_result(outcome, name, group, note, ref_url, **data)