diff --git a/src/python/devtest/os/test/ListCmd.py b/src/python/devtest/os/test/ListCmd.py index 1aa9b70..28eb94f 100644 --- a/src/python/devtest/os/test/ListCmd.py +++ b/src/python/devtest/os/test/ListCmd.py @@ -8,6 +8,7 @@ import traceback from operator import itemgetter from functools import total_ordering from jwutils.log import * +from jwutils.misc import update_symlink from jwutils import Options from devtest.os import * from devtest.os.test import * @@ -374,7 +375,9 @@ class ListCmd(TestCase): # export if self.__write_response and (len(missing) or len(too_many)): feature_diff = set(features) - last_features # if len(feature_diff) ? response_path = self.refpath[0] + '.bad' + link_path = None if tstamp is not None: + link_path = response_path response_path += '-' + tstamp feature_diff_str = ', '.join(['"{}"'.format(f) for f in feature_diff]) with open(response_path, "w") as f: @@ -390,6 +393,8 @@ class ListCmd(TestCase): # export for row in too_many: f.write(row.line.strip() + ' # "needed": [{}], "bad": ["default"]\n'.format(feature_diff_str)) + if link_path is not None: + update_symlink(response_path, link_path) return and_str.join(r) async def _run(self, env, machine, phase): @@ -413,4 +418,4 @@ class ListCmd(TestCase): # export slog(NOTICE, "{}".format(l), caller=caller) def test(self, output, features): - self._eval(output, features) + return self._eval(output, features)