Commit df0f1bd1 authored by Jérome Perrin's avatar Jérome Perrin

Revert "WIP log"

This reverts commit 3160c589.

pushed by mistake. This is unfinished but it was wrong because we copy
this log file to snapshot directory before we are done writing to it.
parent 3160c589
...@@ -152,14 +152,7 @@ def makeModuleSetUpAndTestCaseClass( ...@@ -152,14 +152,7 @@ def makeModuleSetUpAndTestCaseClass(
if debug: if debug:
unittest.installHandler() unittest.installHandler()
logging.basicConfig( logging.basicConfig(
level=logging.DEBUG, level=logging.DEBUG if (verbose or debug) else logging.WARNING)
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_
...@@ -369,9 +362,7 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False): ...@@ -369,9 +362,7 @@ 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