Patchwork systemd: add ptest

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Sept. 3, 2013, 2:50 a.m.
Message ID <1378176620-27415-1-git-send-email-rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/57249/
State New
Headers show

Comments

rongqing.li@windriver.com - Sept. 3, 2013, 2:50 a.m.
From: "Roy.Li" <rongqing.li@windriver.com>

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 meta/recipes-core/systemd/systemd/run-ptest |    2 ++
 meta/recipes-core/systemd/systemd_206.bb    |   16 +++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/systemd/systemd/run-ptest
Shakeel, Muhammad - Sept. 23, 2013, 9:24 a.m.
On 09/03/2013 07:50 AM, rongqing.li@windriver.com wrote:
> +do_install_ptest () {
> +       install -d ${D}${PTEST_PATH}/test
> +       install -d ${D}${libdir}/udev/rules.d
> +       install ${B}/test/* ${D}${PTEST_PATH}/test
This patch is merged into master and I am trying to build systemd with 
ptest but I see error that ${B}/test/* doesn't exist (true). It works 
fine if I replace 'B' with 'S' where this directory is actually present.
Is someone else seeing this error or it is something wrong with my 
environment?
> +       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
> +       install -d ${D}${PTEST_PATH}/build-aux
> +       cp -rf ${B}/rules ${D}${PTEST_PATH}/
> +       cp ${B}/Makefile ${D}${PTEST_PATH}/
> +       cp ${B}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
Same error here and same solution works here.
> +       tar -C ${D}${PTEST_PATH}/test -xJf ${B}/test/sys.tar.xz
'S' for 'B' here as well.
> +       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
> +}
> +
Thanks,
Shakeel

Patch

diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
new file mode 100644
index 0000000..0418bc9
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -0,0 +1,2 @@ 
+make test/rules-test.sh.log
+make test/udev-test.pl.log
diff --git a/meta/recipes-core/systemd/systemd_206.bb b/meta/recipes-core/systemd/systemd_206.bb
index 75bdc61..9944459 100644
--- a/meta/recipes-core/systemd/systemd_206.bb
+++ b/meta/recipes-core/systemd/systemd_206.bb
@@ -15,7 +15,7 @@  DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu ptest
 
 SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://0001-use-CAP_MKNOD-ConditionCapability.patch \
@@ -24,6 +24,7 @@  SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            ${UCLIBCPATCHES} \
            file://00-create-volatile.conf \
            file://init \
+           file://run-ptest \
           "
 SRC_URI[md5sum] = "89e36f2d3ba963020b72738549954cbc"
 SRC_URI[sha256sum] = "4c993de071118ea1df7ffc4be26ef0b0d78354ef15b2743a2783d20edfcde9de"
@@ -113,6 +114,19 @@  do_install() {
 	fi
 }
 
+do_install_ptest () {
+       install -d ${D}${PTEST_PATH}/test
+       install -d ${D}${libdir}/udev/rules.d
+       install ${B}/test/* ${D}${PTEST_PATH}/test
+       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
+       install -d ${D}${PTEST_PATH}/build-aux
+       cp -rf ${B}/rules ${D}${PTEST_PATH}/
+       cp ${B}/Makefile ${D}${PTEST_PATH}/
+       cp ${B}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
+       tar -C ${D}${PTEST_PATH}/test -xJf ${B}/test/sys.tar.xz
+       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
+}
+
 python populate_packages_prepend (){
     systemdlibdir = d.getVar("rootlibdir", True)
     do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)