mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
Add a VERBOSE option to make check (make check VERBOSE=1).
This commit is contained in:
parent
9443b5d4cd
commit
e3e64c8ea4
@ -27,6 +27,7 @@ abs_top_srcdir = @abs_top_srcdir@
|
||||
|
||||
T ?= .
|
||||
S ?= @ # never match anything by default
|
||||
VERBOSE ?= 0
|
||||
RUN = $(shell find -regextype posix-egrep -name t-\*.sh -and -regex ".*($(T)).*" -and -not -regex ".*($(S)).*" | sort)
|
||||
|
||||
# Shell quote;
|
||||
@ -49,17 +50,17 @@ endif
|
||||
|
||||
all check: init.sh
|
||||
@echo Testing with locking_type 1
|
||||
./bin/harness $(RUN)
|
||||
VERBOSE=$(VERBOSE) ./bin/harness $(RUN)
|
||||
@echo Testing with locking_type 3
|
||||
LVM_TEST_LOCKING=3 ./bin/harness $(RUN)
|
||||
VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./bin/harness $(RUN)
|
||||
|
||||
check_cluster: init.sh
|
||||
@echo Testing with locking_type 3
|
||||
LVM_TEST_LOCKING=3 ./bin/harness $(RUN)
|
||||
VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./bin/harness $(RUN)
|
||||
|
||||
check_local: init.sh
|
||||
@echo Testing with locking_type 1
|
||||
LVM_TEST_LOCKING=1 ./bin/harness $(RUN)
|
||||
VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=1 ./bin/harness $(RUN)
|
||||
|
||||
bin/not: $(srcdir)/not.c .bin-dir-stamp
|
||||
$(CC) -o bin/not $<
|
||||
|
@ -39,6 +39,7 @@ char *readbuf = NULL;
|
||||
int readbuf_sz = 0, readbuf_used = 0;
|
||||
|
||||
int die = 0;
|
||||
int verbose = 0;
|
||||
|
||||
#define PASSED 0
|
||||
#define SKIPPED 1
|
||||
@ -64,6 +65,8 @@ void drain() {
|
||||
char buf[2048];
|
||||
while (1) {
|
||||
sz = read(fds[1], buf, 2048);
|
||||
if (verbose)
|
||||
write(1, buf, sz);
|
||||
if (sz <= 0)
|
||||
return;
|
||||
if (readbuf_used + sz >= readbuf_sz) {
|
||||
@ -164,7 +167,10 @@ int main(int argc, char **argv) {
|
||||
s.nwarned = s.nfailed = s.npassed = s.nskipped = 0;
|
||||
|
||||
char *config = getenv("LVM_TEST_CONFIG"),
|
||||
*config_debug;
|
||||
*config_debug,
|
||||
*be_verbose = getenv("VERBOSE");
|
||||
if (be_verbose && atoi(be_verbose))
|
||||
verbose = 1; // XXX
|
||||
config = config ? config : "";
|
||||
asprintf(&config_debug, "%s\n%s\n", config, "log { verbose=4 }");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user