Module: check_mk
Branch: master
Commit: 2e76ff8492036641ce133ad9aa79590dce376622
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2e76ff84920366…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 15 10:52:00 2017 +0100
crawl test: copy previous report file fir later manual checks
Change-Id: I96dbec21e88ad78ea28ce3da3eed45cb16f4aa20
---
tests/web/test_crawl.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/web/test_crawl.py b/tests/web/test_crawl.py
index 3d90d61..cc8c77e 100644
--- a/tests/web/test_crawl.py
+++ b/tests/web/test_crawl.py
@@ -369,6 +369,10 @@ class TestCrawler(object):
f.write("Crawled %d URLs in %d seconds. Failures:\n%s\n" %
(len(self.visited), time.time() - self.started,
"\n".join(self.errors)))
+ # Copy the previous file for analysis
+ if os.path.exists(self.report_file()):
+ open(self.report_file()+".old",
"w").write(open(self.report_file()).read())
+
os.rename(self.report_file()+".tmp", self.report_file())
if self.errors: