master - tests: extend harness
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4937df4aed699a5e3bc3c860e897fa0e448cfc6b Commit: 4937df4aed699a5e3bc3c860e897fa0e448cfc6b Parent: c888c925b8d561158c3cea6d4f5ea4e173848c00 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Jun 8 22:23:39 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Jun 11 14:07:51 2013 +0200
tests: extend harness
Add limit for buffer so if the test is running in some loop and generating lots of output, the output log gets too large for browser to display (at least Firefox is quite confused to display 300MB logs).
For now limit max output of one test to 32MB.
If there is need to see full log set LVM_TEST_UNLIMITED to disable interruption of test.
harness now also prints max memory used during test, it user and system time and amount of read/write operations.
--- test/Makefile.in | 3 +- test/lib/harness.c | 163 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 110 insertions(+), 56 deletions(-)
test/Makefile.in +2 -1
@@ -63,6 +63,7 @@ help: @echo " LVM_TEST_NODEBUG Do not debug lvm commands." @echo " LVM_TEST_PARALLEL May skip agresive wipe of LVMTEST resources." @echo " LVM_TEST_RESULTS Where to create result files [results]." + @echo " LVM_TEST_UNLIMITED Set to get unlimited test log (>32MB)" @echo " LVM_VERIFY_UDEV Default verify state for lvm.conf." @echo " S Skip given test (regex)." @echo " T Run given test (regex)."
@@ -124,7 +125,7 @@ CMDS = lvm $(shell cat $(top_builddir)/tools/.commands) ln -sf $(abs_top_srcdir)/test/$$f $$f; \ done; \ fi - $(MKDIR_P) -m a=rwx $(LVM_TEST_RESULTS) + @$(MKDIR_P) -m a=rwx $(LVM_TEST_RESULTS) touch $@ .lib-dir-stamp:
test/lib/harness.c +108 -55
313 lines not on this page · raw message