From dcf2dcd03dfe2c7a7e957d58ac50583878cfe277 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Sat, 19 Jan 2013 17:04:57 +0000 Subject: [PATCH] all we need to debug failed test cases while regression test run.. --- lib/core/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/testing.py b/lib/core/testing.py index f6ef2acab..ecaaec7f5 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -169,7 +169,6 @@ def liveTest(): 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") @@ -187,6 +186,7 @@ def liveTest(): errMsg += " - SQL injection not detected" logger.error(errMsg) + test_case_fd.write("\n%s" % errMsg) if failedParseOn: console_output_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "console_output"), "wb", UNICODE_ENCODING) @@ -203,6 +203,7 @@ def liveTest(): if conf.stopFail is True: return retVal + test_case_fd.close() retVal &= bool(result) dataToStdout("\n")