diff options
author | Roy Li <rongqing.li@windriver.com> | 2016-01-25 11:04:33 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-26 22:31:59 +0000 |
commit | 962cc37c534cfbd23febe494d1c5f07de2e154ae (patch) | |
tree | 0af7cc67b45b3a7167887801f02bde5f4c7c1114 /meta | |
parent | 9967746a35d9217d074a79e67b4f05779ba01e43 (diff) | |
download | poky-962cc37c534cfbd23febe494d1c5f07de2e154ae.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-make-test-dir-configurable.patch | 64 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_228.bb | 4 |
2 files changed, 67 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-make-test-dir-configurable.patch b/meta/recipes-core/systemd/systemd/0001-make-test-dir-configurable.patch new file mode 100644 index 0000000000..7d06371c95 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-make-test-dir-configurable.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 3eeec270d3af166e3bc09537626850562487742b Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Fri, 22 Jan 2016 16:44:11 +0800 | ||
4 | Subject: [PATCH] make test dir configurable | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | test maybe be run on target in cross-compile environment, and test dir | ||
9 | is not the compilation dir, so make it configurable | ||
10 | |||
11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
12 | --- | ||
13 | Makefile.am | 2 +- | ||
14 | configure.ac | 7 +++++++ | ||
15 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/Makefile.am b/Makefile.am | ||
18 | index 931d13f..7155ec7 100644 | ||
19 | --- a/Makefile.am | ||
20 | +++ b/Makefile.am | ||
21 | @@ -209,7 +209,7 @@ AM_CPPFLAGS = \ | ||
22 | -DROOTLIBDIR=\"$(rootlibdir)\" \ | ||
23 | -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ | ||
24 | -DROOTHOMEDIR=\"$(roothomedir)\" \ | ||
25 | - -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ | ||
26 | + -DTEST_DIR=\"$(testdir)/test\" \ | ||
27 | -I $(top_srcdir)/src \ | ||
28 | -I $(top_builddir)/src/basic \ | ||
29 | -I $(top_srcdir)/src/basic \ | ||
30 | diff --git a/configure.ac b/configure.ac | ||
31 | index 76090a1..b02968d 100644 | ||
32 | --- a/configure.ac | ||
33 | +++ b/configure.ac | ||
34 | @@ -1411,6 +1411,11 @@ AC_ARG_WITH([roothomedir], | ||
35 | [], | ||
36 | [with_roothomedir=/root]) | ||
37 | |||
38 | +AC_ARG_WITH([testdir], | ||
39 | + AS_HELP_STRING([--with-testdir=DIR], [test file directory]), | ||
40 | + [], | ||
41 | + [with_testdir=${abs_top_srcdir}]) | ||
42 | + | ||
43 | AC_ARG_WITH([pamlibdir], | ||
44 | AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), | ||
45 | [], | ||
46 | @@ -1503,6 +1508,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir]) | ||
47 | AC_SUBST([rootprefix], [$with_rootprefix]) | ||
48 | AC_SUBST([rootlibdir], [$with_rootlibdir]) | ||
49 | AC_SUBST([roothomedir], [$with_roothomedir]) | ||
50 | +AC_SUBST([testdir], [$with_testdir]) | ||
51 | |||
52 | AC_CONFIG_FILES([ | ||
53 | Makefile | ||
54 | @@ -1593,6 +1599,7 @@ AC_MSG_RESULT([ | ||
55 | lib dir: ${libdir} | ||
56 | rootlib dir: ${with_rootlibdir} | ||
57 | root home dir: ${with_roothomedir} | ||
58 | + test dir: ${with_testdir} | ||
59 | SysV init scripts: ${SYSTEM_SYSVINIT_PATH} | ||
60 | SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} | ||
61 | Build Python: ${PYTHON} | ||
62 | -- | ||
63 | 1.9.1 | ||
64 | |||
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb index 0e1bd8b7f1..a110f0cdea 100644 --- a/meta/recipes-core/systemd/systemd_228.bb +++ b/meta/recipes-core/systemd/systemd_228.bb | |||
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \ | |||
45 | file://00-create-volatile.conf \ | 45 | file://00-create-volatile.conf \ |
46 | file://init \ | 46 | file://init \ |
47 | file://run-ptest \ | 47 | file://run-ptest \ |
48 | file://0001-make-test-dir-configurable.patch \ | ||
48 | " | 49 | " |
49 | SRC_URI_append_libc-uclibc = "\ | 50 | SRC_URI_append_libc-uclibc = "\ |
50 | file://0001-define-exp10-if-missing.patch \ | 51 | file://0001-define-exp10-if-missing.patch \ |
@@ -127,6 +128,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ | |||
127 | --without-python \ | 128 | --without-python \ |
128 | --with-sysvrcnd-path=${sysconfdir} \ | 129 | --with-sysvrcnd-path=${sysconfdir} \ |
129 | --with-firmware-path=/lib/firmware \ | 130 | --with-firmware-path=/lib/firmware \ |
131 | --with-testdir=${PTEST_PATH} \ | ||
130 | " | 132 | " |
131 | # uclibc does not have NSS | 133 | # uclibc does not have NSS |
132 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname --disable-sysusers" | 134 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname --disable-sysusers" |
@@ -215,7 +217,7 @@ do_install() { | |||
215 | 217 | ||
216 | do_install_ptest () { | 218 | do_install_ptest () { |
217 | install -d ${D}${PTEST_PATH}/test | 219 | install -d ${D}${PTEST_PATH}/test |
218 | cp -rf ${S}/test/* ${D}${PTEST_PATH}/test | 220 | cp -rfL ${S}/test/* ${D}${PTEST_PATH}/test |
219 | install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ | 221 | install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ |
220 | install -d ${D}${PTEST_PATH}/build-aux | 222 | install -d ${D}${PTEST_PATH}/build-aux |
221 | cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ | 223 | cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ |