[LTP] [PATCH v2 3/3] configure: Integrate open posix testsuite configure

Joerg Vehlow lkml@jv-coder.de
Wed Jul 27 07:33:07 CEST 2022


From: Joerg Vehlow <joerg.vehlow@aox.de>

This changes the default installation location
of the open posix testsuite from
$prefix
to
$prefix/testcases/open_posix_testsuite

Scripts for execution of the testsuite (run-all-posix-option-group-tests.sh,
run-posix-option-group-test.sh) will still be installed under $prefix/bin.

To revert back to the old installation behavior, just use
./configure -with-open-posix-testdir=.

Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de>
---
 configure.ac           | 11 +++++++++++
 include/mk/automake.mk |  7 ++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 69b145b5f..4256b3113 100644
--- a/configure.ac
+++ b/configure.ac
@@ -334,8 +334,19 @@ AC_ARG_WITH([open-posix-testsuite],
   [with_open_posix_testsuite=$withval],
   [with_open_posix_testsuite=no]
 )
+
+# Allow setting the directoy, where the open posix testsuite is installed to.
+# If nothing is defined, we have to pass our default value to submake
+AC_ARG_WITH([open-posix-testdir],
+  [AS_HELP_STRING([--with-open-posix-testdir=<dir>],
+    [set the directory, where the open posix testsuite will be installed under prefix])],
+  [],
+  [ac_configure_args="$ac_configure_args --with-open-posix-testdir=testcases/open_posix_testsuite"]
+)
+
 if test "x$with_open_posix_testsuite" = xyes; then
     AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
+    AC_CONFIG_SUBDIRS([testcases/open_posix_testsuite])
 else
     AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
 fi
diff --git a/include/mk/automake.mk b/include/mk/automake.mk
index 219d015d0..ee3b7f1b8 100644
--- a/include/mk/automake.mk
+++ b/include/mk/automake.mk
@@ -27,7 +27,8 @@ AUTOHEADER	?= autoheader
 AUTOMAKE	?= automake
 
 AUTOCONFED_SUBDIRS	= \
-			testcases/realtime
+			testcases/realtime \
+			testcases/open_posix_testsuite
 
 # We want to run this every single time to ensure that all of the prereq files
 # are there.
@@ -35,6 +36,10 @@ AUTOCONFED_SUBDIRS	= \
 testcases/realtime/configure:
 	$(MAKE) -C $(@D) autotools
 
+.PHONY: testcases/open_posix_testsuite/configure
+testcases/open_posix_testsuite/configure:
+	$(MAKE) -C $(@D) autotools
+
 .PHONY: autotools
 autotools: aclocal autoconf autoheader automake $(addsuffix /configure,$(AUTOCONFED_SUBDIRS))
 
-- 
2.25.1



More information about the ltp mailing list