linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH liburing] liburing: create an installation target for tests
@ 2019-11-28 10:26 Johannes Thumshirn
  2019-11-28 15:00 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2019-11-28 10:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Block Layer Mailinglist, Johannes Thumshirn

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH liburing] liburing: create an installation target for tests
  2019-11-28 10:26 [PATCH liburing] liburing: create an installation target for tests Johannes Thumshirn
@ 2019-11-28 15:00 ` Jens Axboe
  2019-11-28 15:08   ` Johannes Thumshirn
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2019-11-28 15:00 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: Linux Block Layer Mailinglist, io-uring

On 11/28/19 2:26 AM, Johannes Thumshirn wrote:
> Create an installation target for liburing's regressen test suite.
                                                ^^^^^^^^^
regression, will fix it up.

Applied, thanks. BTW, io-uring@vger.kernel.org is the io_uring mailing
list. Since it has nothing to do with linux-block, I've stopped using
that list.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH liburing] liburing: create an installation target for tests
  2019-11-28 15:00 ` Jens Axboe
@ 2019-11-28 15:08   ` Johannes Thumshirn
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2019-11-28 15:08 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linux Block Layer Mailinglist, io-uring

On 28/11/2019 16:00, Jens Axboe wrote:
> On 11/28/19 2:26 AM, Johannes Thumshirn wrote:
>> Create an installation target for liburing's regressen test suite.
>                                                 ^^^^^^^^^
> regression, will fix it up.

Thanks

> 
> Applied, thanks. BTW, io-uring@vger.kernel.org is the io_uring mailing
> list. Since it has nothing to do with linux-block, I've stopped using
> that list.

Yes I more or less knew, but I couldn't find the address any-more
(get_maintainers.pl would have helped...)

Anyway, thanks

-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@suse.de                                +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-28 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 10:26 [PATCH liburing] liburing: create an installation target for tests Johannes Thumshirn
2019-11-28 15:00 ` Jens Axboe
2019-11-28 15:08   ` Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).