[PATCH libaio 01/28] harness: allow running tests against the installed library
authorJeff Moyer <jmoyer@redhat.com>
Mon, 29 Jul 2019 14:07:23 +0000 (10:07 -0400)
committerGuillem Jover <guillem@debian.org>
Thu, 24 Dec 2020 14:41:17 +0000 (14:41 +0000)
A user can now specify "LIBAIO=/path/to/libaio.so" in order to run
the test harness against the installed library.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0001-harness-allow-running-tests-against-the-installed-li.patch

harness/Makefile

index f4777374e3de3dae5e836d3460aa135b4e8f5632..87b33f691f491ff88e6240f7220401bd24368106 100644 (file)
@@ -9,10 +9,14 @@ HARNESS_SRCS:=main.c
 CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE)
 #-lpthread -lrt
 
+# Change this on the build line to run tests against the installed libraries:
+# make LIBAIO=-laio partcheck
+LIBAIO?=../src/libaio.a
+
 all: $(PROGS)
 
 $(PROGS): %.p: %.t $(HARNESS_SRCS)
-       $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a -lpthread
+       $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c $(LIBAIO) -lpthread
 
 clean:
        rm -f $(PROGS) *.o runtests.out rofile wofile rwfile