Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Joerg Vehlow <lkml@jv-coder.de>
Cc: Joerg Vehlow <joerg.vehlow@aox.de>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/3] openposix: Setup autoconf and fix installation layout
Date: Mon, 29 Aug 2022 07:49:31 +0200	[thread overview]
Message-ID: <YwxTawqy36p3RU2j@pevik> (raw)
In-Reply-To: <20220727053307.3009235-3-lkml@jv-coder.de>

Hi Joerg,

[ Cc Li ]

> This allows installation of the tests to a different directory
> than directly under $prefix.

> Before the layout was:
> $prefix/bin/{run-*,t0,run-tests.h,Makefile}
> $prefix/conformance
> $prefix/functional
> $prefix/stress

> with prefix being /opt/openposix_testsuite on linux and
> /usr/local/openposix_testsuite on other systems
> OR the value of the env-var $prefix.

> With this change, the prefix defaults to /opt/openposix_testsuite
> and can be changed the usual way using configure (./configure ---prefix=foo)
> Additionally the path of the tests below $prefix can be changed, using
> configure --with-open-posix-testdir=<foo>. This allows clean installation as
> part of ltp:

> $prefix/bin/{run-all-posix-option-group-tests.sh,run-posix-option-group-test.sh}
> $prefix/$testdir/bin/{run-tests.sh,t0}
> $prefix/$testdir/conformance
> $prefix/$testdir/functional
> $prefix/$testdir/stress

> Only the two directly callable shell scripts are kept under $prefix/bin,
> the two other executables are moved to testdir, because they are only
> used by the implementation of the test execution scripts (run.sh)
> $prefix/bin/Makefile is not installed anymore, because it is not required.

It took me a while to do a bit of testing.
Whole improvements LGTM.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
> +++ b/testcases/open_posix_testsuite/bin/Makefile
> @@ -4,18 +4,32 @@
>  # Ngie Cooper, July 2010


> -top_srcdir?=		..
> +top_srcdir ?= ..

> -srcdir=			$(top_srcdir)/bin
> +include $(top_srcdir)/include/mk/config.mk

> -prefix?=		`$(top_srcdir)/scripts/print-prefix.sh`
> -
> -bindir?=		$(prefix)/bin
> +INSTALL_BIN_TARGETS = run-all-posix-option-group-tests.sh run-posix-option-group-test.sh
> +INSTALL_TESTCASE_BIN_TARGETS = run-tests.sh t0

> +.PHONY: clean
>  clean:
>  	@rm -f t0.val

> -install: clean
> -	@set -e; for i in `ls *`; do \
> -	    install -m 0755 $$i $(DESTDIR)/$(bindir)/. ;\
> +.PHONY: install
> +install: clean $(DESTDIR)/$(bindir) $(DESTDIR)/$(testdir_bin)
> +	set -e; for file in $(INSTALL_BIN_TARGETS); do           \
> +		install -m 00755 $$file $(DESTDIR)/$(bindir)/$$file; \
> +	done
> +
> +	sed -i 's~TESTPATH=""~TESTPATH="$(testdir_rel)"~' $(DESTDIR)/$(bindir)/run-posix-option-group-test.sh
nit: TESTPATH="" below could be just TESTPATH=. Obviously sed here would need to
be adjusted.
> +
> +	set -e; for file in $(INSTALL_TESTCASE_BIN_TARGETS); do	      \
> +		install -m 00755 $$file $(DESTDIR)/$(testdir_bin)/$$file; \
>  	done
> +
> +
> +$(DESTDIR)/$(bindir):
> +	mkdir -p $@
> +
> +$(DESTDIR)/$(testdir_bin):
> +	mkdir -p $@
> diff --git a/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh b/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh
> index 1bbdddfd5..e90c252a3 100755
> --- a/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh
> +++ b/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh
> @@ -8,7 +8,9 @@

>  # Use to build and run tests for a specific area

> -BASEDIR="$(dirname "$0")/../conformance/interfaces"
> +TESTPATH=""
> +
> +BASEDIR="$(dirname "$0")/../${TESTPATH}/conformance/interfaces"

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-08-29  5:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  5:33 [LTP] [PATCH v2 0/3] openposix: Fix installation file layout Joerg Vehlow
2022-07-27  5:33 ` [LTP] [PATCH v2 1/3] openposix: Fix existence test for local flag-files Joerg Vehlow
2022-07-29 17:16   ` Petr Vorel
2022-08-23 10:03   ` Petr Vorel
2022-07-27  5:33 ` [LTP] [PATCH v2 2/3] openposix: Setup autoconf and fix installation layout Joerg Vehlow
2022-08-29  5:49   ` Petr Vorel [this message]
2022-08-30 11:00   ` Richard Palethorpe
2022-07-27  5:33 ` [LTP] [PATCH v2 3/3] configure: Integrate open posix testsuite configure Joerg Vehlow
2022-07-29 17:23   ` Petr Vorel
2022-08-01  7:16     ` Richard Palethorpe
2022-08-30  9:59       ` Li Wang
2022-08-03  4:45     ` Joerg Vehlow
2022-08-29 16:42   ` Petr Vorel
2022-08-30 11:01   ` Richard Palethorpe
2022-08-30 11:37     ` Petr Vorel
2022-08-26  8:49 ` [LTP] [PATCH v2 0/3] openposix: Fix installation file layout Petr Vorel

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=YwxTawqy36p3RU2j@pevik \
    --to=pvorel@suse.cz \
    --cc=joerg.vehlow@aox.de \
    --cc=lkml@jv-coder.de \
    --cc=ltp@lists.linux.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox