mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-devtest
synced 2026-01-15 10:23:32 +01:00
os.test.ListCmd: Add response output convenience symlink
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
6da9e6af00
commit
f7542eff89
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue