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;
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 $<
int readbuf_sz = 0, readbuf_used = 0;
int die = 0;
+int verbose = 0;
#define PASSED 0
#define SKIPPED 1
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) {
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 }");