avocado app: Remove --keep-tmp-files from 'avocado run'

It is not a widely used option, so it's better to keep it
in runner.behavior.keep_tmp_files config.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 c191c790
......@@ -40,6 +40,7 @@ from avocado.plugins import jsonresult
from avocado.plugins import xunit
from avocado.utils import archive
from avocado.utils import path
from avocado.settings import settings
try:
from avocado.plugins import htmlresult
......@@ -295,7 +296,8 @@ class Job(object):
if getattr(self.args, 'archive', False):
filename = self.logdir + '.zip'
archive.create(filename, self.logdir)
if not getattr(self.args, 'keep_tmp_files', False):
if not settings.get_value('runner.behavior', 'keep_tmp_files',
key_type=bool, default=False):
data_dir.clean_tmp_files()
_TEST_LOGGER.info('Test results available in %s', self.logdir)
......
......@@ -52,9 +52,6 @@ class TestRunner(plugin.Plugin):
self.parser.add_argument('-z', '--archive', action='store_true', default=False,
help='Archive (ZIP) files generated by tests')
self.parser.add_argument('--keep-tmp-files', action='store_true', default=False,
help='Keep temporary files generated by tests')
self.parser.add_argument('--force-job-id', dest='unique_job_id',
type=str, default=None,
help=('Forces the use of a particular job ID. Used '
......
......@@ -13,6 +13,9 @@ profiler_commands = vmstat 1:journalctl -f
[runner.output]
colored = True
[runner.behavior]
keep_tmp_files = False
[restclient.connection]
hostname = localhost
port = 9405
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册