Open psss opened 3 years ago
@psss and @lukaszachy, since we have option PLAN_SKIP_WORKTREE_INIT now while fixing issue 1061, can we use the similar approach to fix this issue?
# Option to skip to initialize work tree in plan
PLAN_SKIP_WORKTREE_INIT = 'plan_skip_worktree_init'
I'm not sure we need such option - Isn't it enough to remove check for finish.enabled at https://github.com/teemtee/tmt/blob/main/tmt/base.py#L1651 ?
I didn't expect that -r (as run option) depends on 'finish' plugin being run. However we can have discussion what is meant by finished in tmt run --help's "Remove the workdir when test run is finished"
I always understood it as 'tmt run process is finished' not 'step called finish was used'
I always understood it as 'tmt run process is finished' not 'step called finish was used'
@lukaszachy, in the command tmt run -rf discover finish
pasted by @psss , finish
right here is a step?
I didn't expect that -r (as run option) depends on 'finish' plugin being run. However we can have discussion what is meant by finished in tmt run --help's "Remove the workdir when test run is finished"
From the code of tmt/cli.py#L223,
@click.option(
'-r', '--rm', '--remove', 'remove', is_flag=True,
help='Remove the workdir when test run is finished.')
(from my understanding), it means if we specify -r
in tmt run ...
, the workdir should be removd.
workdir
means /var/tmp/tmt/run-NNN
? log.txt
in it. @psss, is there a typical application scenario to run tmt run -r discover
?
For this quite common use case (check which tests would be run) workdir is not removed:
User needs to do:
I guess explicitly specifying the
finish
step should not be necessary.