mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
systemd: make TEST_DIR configurable
1. make TEST_DIR configurable, and configure it to ptest dir, since the *.service for test are installed into ptest dir. 2. always follow symbolic links in SOURCE when copy test files to install dir, since some *.service under test dir are linked to ../unit/*.service which are not installed into ptest dir (From OE-Core rev: a9db2b514e1f1093cd80a7793813136f26e531da) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,64 @@
|
|||||||
|
From 3eeec270d3af166e3bc09537626850562487742b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Roy Li <rongqing.li@windriver.com>
|
||||||
|
Date: Fri, 22 Jan 2016 16:44:11 +0800
|
||||||
|
Subject: [PATCH] make test dir configurable
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
test maybe be run on target in cross-compile environment, and test dir
|
||||||
|
is not the compilation dir, so make it configurable
|
||||||
|
|
||||||
|
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||||
|
---
|
||||||
|
Makefile.am | 2 +-
|
||||||
|
configure.ac | 7 +++++++
|
||||||
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index 931d13f..7155ec7 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -209,7 +209,7 @@ AM_CPPFLAGS = \
|
||||||
|
-DROOTLIBDIR=\"$(rootlibdir)\" \
|
||||||
|
-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
|
||||||
|
-DROOTHOMEDIR=\"$(roothomedir)\" \
|
||||||
|
- -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
|
||||||
|
+ -DTEST_DIR=\"$(testdir)/test\" \
|
||||||
|
-I $(top_srcdir)/src \
|
||||||
|
-I $(top_builddir)/src/basic \
|
||||||
|
-I $(top_srcdir)/src/basic \
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 76090a1..b02968d 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -1411,6 +1411,11 @@ AC_ARG_WITH([roothomedir],
|
||||||
|
[],
|
||||||
|
[with_roothomedir=/root])
|
||||||
|
|
||||||
|
+AC_ARG_WITH([testdir],
|
||||||
|
+ AS_HELP_STRING([--with-testdir=DIR], [test file directory]),
|
||||||
|
+ [],
|
||||||
|
+ [with_testdir=${abs_top_srcdir}])
|
||||||
|
+
|
||||||
|
AC_ARG_WITH([pamlibdir],
|
||||||
|
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
|
||||||
|
[],
|
||||||
|
@@ -1503,6 +1508,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
|
||||||
|
AC_SUBST([rootprefix], [$with_rootprefix])
|
||||||
|
AC_SUBST([rootlibdir], [$with_rootlibdir])
|
||||||
|
AC_SUBST([roothomedir], [$with_roothomedir])
|
||||||
|
+AC_SUBST([testdir], [$with_testdir])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
@@ -1593,6 +1599,7 @@ AC_MSG_RESULT([
|
||||||
|
lib dir: ${libdir}
|
||||||
|
rootlib dir: ${with_rootlibdir}
|
||||||
|
root home dir: ${with_roothomedir}
|
||||||
|
+ test dir: ${with_testdir}
|
||||||
|
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
|
||||||
|
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
|
||||||
|
Build Python: ${PYTHON}
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
|
|||||||
file://00-create-volatile.conf \
|
file://00-create-volatile.conf \
|
||||||
file://init \
|
file://init \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
|
file://0001-make-test-dir-configurable.patch \
|
||||||
"
|
"
|
||||||
SRC_URI_append_libc-uclibc = "\
|
SRC_URI_append_libc-uclibc = "\
|
||||||
file://0001-define-exp10-if-missing.patch \
|
file://0001-define-exp10-if-missing.patch \
|
||||||
@@ -127,6 +128,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
|
|||||||
--without-python \
|
--without-python \
|
||||||
--with-sysvrcnd-path=${sysconfdir} \
|
--with-sysvrcnd-path=${sysconfdir} \
|
||||||
--with-firmware-path=/lib/firmware \
|
--with-firmware-path=/lib/firmware \
|
||||||
|
--with-testdir=${PTEST_PATH} \
|
||||||
"
|
"
|
||||||
# uclibc does not have NSS
|
# uclibc does not have NSS
|
||||||
EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname --disable-sysusers"
|
EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname --disable-sysusers"
|
||||||
@@ -215,7 +217,7 @@ do_install() {
|
|||||||
|
|
||||||
do_install_ptest () {
|
do_install_ptest () {
|
||||||
install -d ${D}${PTEST_PATH}/test
|
install -d ${D}${PTEST_PATH}/test
|
||||||
cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
|
cp -rfL ${S}/test/* ${D}${PTEST_PATH}/test
|
||||||
install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
|
install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
|
||||||
install -d ${D}${PTEST_PATH}/build-aux
|
install -d ${D}${PTEST_PATH}/build-aux
|
||||||
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
|
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
|
||||||
|
|||||||
Reference in New Issue
Block a user