diff --git a/src/python/devtest/os/test/ListCmd.py b/src/python/devtest/os/test/ListCmd.py index a7a674e..b233b50 100644 --- a/src/python/devtest/os/test/ListCmd.py +++ b/src/python/devtest/os/test/ListCmd.py @@ -276,7 +276,7 @@ class ListCmd(TestCase): # export raise Exception('Failed to compile regex ({}): >{}<'.format(e, str(re_str))) return list(filter(None, [parse_line(l, fields) for l in lines])) - def _eval(self, output, features, header=None): + def _eval(self, output, features, header=None, tstamp=None): def format_rows(rows, quotes=False): #def cmp(r1, r2): @@ -361,6 +361,8 @@ class ListCmd(TestCase): # export feature_diff = set(features) - last_features if self.__write_response and len(feature_diff): response_path = self.refpath[0] + '.bad' + if tstamp is not None: + response_path += '-' + tstamp feature_diff_str = ', '.join(['"{}"'.format(f) for f in feature_diff]) with open(response_path, "w") as f: slog(INFO, 'Writing feature diff to "{}"'.format(response_path)) @@ -388,7 +390,7 @@ class ListCmd(TestCase): # export else: header = '# ' + cmd + '\n' header += '# features: {}\n'.format(' '.join(env.features)) - return self._eval(output, env.features, header=header) + return self._eval(output, env.features, header=header, tstamp=env.time_stamp) def dump(self, prio, *args, **kwargs): caller = kwargs['caller'] if 'caller' in kwargs.keys() else get_caller_pos(1)