def run_defcore_default(self):
"""Run default defcore sys command."""
options = ["-v"] if not self.insecure else ["-v", self.insecure]
cmd = (["refstack-client", "test", "-c", self.confpath] +
options + ["--test-list", self.defcorelist])
LOGGER.info("Starting Refstack_defcore test case: '%s'.", cmd)
with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
"environment.log"), 'w+') as f_env:
f_env.write(
("Refstack environment:\n"
" SUT: {}\n Scenario: {}\n Node: {}\n Date: {}\n").format(
CONST.__getattribute__('INSTALLER_TYPE'),
CONST.__getattribute__('DEPLOY_SCENARIO'),
CONST.__getattribute__('NODE_NAME'),
time.strftime("%a %b %d %H:%M:%S %Z %Y")))
with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
"refstack.log"), 'w+') as f_stdout:
subprocess.call(cmd, shell=False, stdout=f_stdout,
stderr=subprocess.STDOUT)
评论列表
文章目录