write the test case name before it is run so if the test case crashes badly, we can trace back what test case it was at a later stage

This commit is contained in:
Bernardo Damele 2013-01-19 16:41:19 +00:00
parent 47f0d89fc5
commit f22fd396ef

View File

@ -167,6 +167,10 @@ def liveTest():
result = runCase(switches, parse)
test_case_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "test_case"), "wb", UNICODE_ENCODING)
test_case_fd.write(name)
test_case_fd.close()
if result:
logger.info("test passed")
cleanCase()
@ -184,10 +188,6 @@ def liveTest():
logger.error(errMsg)
test_case_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "test_case"), "wb", UNICODE_ENCODING)
test_case_fd.write(msg)
test_case_fd.close()
if failedParseOn:
console_output_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "console_output"), "wb", UNICODE_ENCODING)
console_output_fd.write(failedParseOn)