From: Johannes Thumshirn <jthumshirn@suse.de>
To: Jens Axboe <axboe@fb.com>
Cc: Linux Block Layer Mailinglist <linux-block@vger.kernel.org>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH liburing] liburing: create an installation target for tests
Date: Thu, 28 Nov 2019 11:26:06 +0100 [thread overview]
Message-ID: <20191128102606.26353-1-jthumshirn@suse.de> (raw)
Create an installation target for liburing's regressen test suite.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
Makefile | 3 +++
configure | 8 ++++++++
test/Makefile | 10 ++++++++++
3 files changed, 21 insertions(+)
diff --git a/Makefile b/Makefile
index 9e132183620a..89b3f1d50135 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,9 @@ install: $(NAME).pc
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man2
$(INSTALL) -m 644 man/*.2 $(DESTDIR)$(mandir)/man2
+install-tests:
+ @$(MAKE) -C test install prefix=$(DESTDIR)$(prefix) datadir=$(DESTDIR)$(datadir)
+
clean:
@rm -f config-host.mak config-host.h cscope.out $(NAME).pc
@$(MAKE) -C src clean
diff --git a/configure b/configure
index 81e4bccab350..babbae1fafc2 100755
--- a/configure
+++ b/configure
@@ -24,6 +24,8 @@ for opt do
;;
--mandir=*) mandir="$optarg"
;;
+ --datadir=*) datadir="$optarg"
+ ;;
*)
echo "ERROR: unkown option $opt"
echo "Try '$0 --help' for more information"
@@ -44,6 +46,10 @@ fi
if test -z "$mandir"; then
mandir="$prefix/man"
fi
+if test -z "$datadir"; then
+ datadir="$prefix/share"
+fi
+
if test "$show_help" = "yes"; then
cat <<EOF
@@ -55,6 +61,7 @@ Options: [defaults in brackets after descriptions]
--includedir=PATH install headers in PATH [$includedir]
--libdir=PATH install libraries in PATH [$libdir]
--mandir=PATH install man pages in PATH [$mandir]
+ --datadir=PATH install shared data in PATH [$datadir]
EOF
exit 0
fi
@@ -163,6 +170,7 @@ print_and_output_mak "prefix" "$prefix"
print_and_output_mak "includedir" "$includedir"
print_and_output_mak "libdir" "$libdir"
print_and_output_mak "mandir" "$mandir"
+print_and_output_mak "datadir" "$datadir"
##########################################
# check for __kernel_rwf_t
diff --git a/test/Makefile b/test/Makefile
index 40b7e76190d6..eb83bc1b7ad4 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,3 +1,8 @@
+prefix ?= /usr
+datadir ?= $(prefix)/share
+
+INSTALL=install
+
CFLAGS ?= -g -O2
XCFLAGS =
override CFLAGS += -Wall -D_GNU_SOURCE -L../src/ -I../src/include/
@@ -41,6 +46,11 @@ send_recvmsg: XCFLAGS = -lpthread
poll-link: XCFLAGS = -lpthread
accept-link: XCFLAGS = -lpthread
+install: $(all_targets) runtests.sh runtests-loop.sh
+ $(INSTALL) -D -d -m 755 $(datadir)/liburing-test/
+ $(INSTALL) -D -m 755 $(all_targets) $(datadir)/liburing-test/
+ $(INSTALL) -D -m 755 runtests.sh $(datadir)/liburing-test/
+ $(INSTALL) -D -m 755 runtests-loop.sh $(datadir)/liburing-test/
clean:
rm -f $(all_targets) $(test_objs)
--
2.16.4
next reply other threads:[~2019-11-28 10:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 10:26 Johannes Thumshirn [this message]
2019-11-28 15:00 ` [PATCH liburing] liburing: create an installation target for tests Jens Axboe
2019-11-28 15:08 ` Johannes Thumshirn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191128102606.26353-1-jthumshirn@suse.de \
--to=jthumshirn@suse.de \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.