Commit 3160c589 authored by Jérome Perrin's avatar Jérome Perrin

WIP log

parent ec94994c
Pipeline #9344 failed with stage
...@@ -152,7 +152,14 @@ def makeModuleSetUpAndTestCaseClass( ...@@ -152,7 +152,14 @@ def makeModuleSetUpAndTestCaseClass(
if debug: if debug:
unittest.installHandler() unittest.installHandler()
logging.basicConfig( logging.basicConfig(
level=logging.DEBUG if (verbose or debug) else logging.WARNING) level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
filename=os.path.join(slap._base_directory, 'var', 'log', 'test.log'))
logger = logging.getLogger()
console_handler = logging.StreamHandler()
console_handler.setLevel(
logging.DEBUG if (verbose or debug) else logging.WARNING)
logger.addHandler(console_handler)
installSoftwareUrlList(cls, [software_url], debug=debug) installSoftwareUrlList(cls, [software_url], debug=debug)
return setUpModule, SlapOSInstanceTestCase_ return setUpModule, SlapOSInstanceTestCase_
...@@ -362,7 +369,9 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False): ...@@ -362,7 +369,9 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
cls.slap.waitForSoftware(max_retry=max_retry, debug=debug) cls.slap.waitForSoftware(max_retry=max_retry, debug=debug)
_storeSoftwareSnapshot('setupModule') _storeSoftwareSnapshot('setupModule')
for software_url in software_url_list: for software_url in software_url_list:
cls.logger.debug("Checking software %s", software_url)
checkSoftware(cls.slap, software_url) checkSoftware(cls.slap, software_url)
cls.logger.debug("Done checking software %s", software_url)
except BaseException as e: except BaseException as e:
if not debug: if not debug:
cls.logger.exception("Error building software, removing") cls.logger.exception("Error building software, removing")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment