summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2015-09-16 01:35:21 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2015-09-23 15:39:45 +0200
commite29f64293c7aa5adc1ce9c4a698e6af889f8bb4f (patch)
tree52dd07e9ba044e07709f8511d7e005afd62e0bd6 /meta-oe/recipes-extended
parent8684b379bc62fed44ad52925182fc804f8137a2a (diff)
downloadmeta-openembedded-e29f64293c7aa5adc1ce9c4a698e6af889f8bb4f.tar.gz
rsyslog: fix ptest
After rsyslog updated to 7.6.1, ptest fails to build & run since the serial-tests config patch was dropped: - rsyslog-use-serial-tests-config-needed-by-ptest.patch This patch involved serial test harness: + AM_INIT_AUTOMAKE([serial-tests]) Which is deprecated in favour of parallel test harness. Automake generated a parallel test harness by default. It features automatic collection of the test scripts output in .log files ... More details please refer to: http://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html To enable the ptest with new changes, we should: * add target 'buildtest-TESTS' for building test components; * fix 'top_srcdir' and install required script 'test-driver'; * run testcases with target 'check-TESTS'. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest2
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb8
2 files changed, 7 insertions, 3 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest b/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest
index 38a1d1b72..3770a7506 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest
@@ -1,3 +1,3 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3make -C tests -k runtest-TESTS 3make -C tests -k check-TESTS
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb
index 15b0f291d..b7a8140b2 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb
@@ -70,7 +70,7 @@ PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
70 70
71TESTDIR = "tests" 71TESTDIR = "tests"
72do_compile_ptest() { 72do_compile_ptest() {
73 sed -i 's/\(^buildtest-TESTS: \)/\1 $(check_PROGRAMS) /' ${TESTDIR}/Makefile 73 echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
74 oe_runmake -C ${TESTDIR} buildtest-TESTS 74 oe_runmake -C ${TESTDIR} buildtest-TESTS
75} 75}
76 76
@@ -82,8 +82,9 @@ do_install_ptest() {
82 # do NOT need to rebuild Makefile itself 82 # do NOT need to rebuild Makefile itself
83 sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile 83 sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
84 84
85 # fix the srcdir 85 # fix the srcdir, top_srcdir
86 sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile 86 sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
87 sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
87 88
88 # valgrind is not compatible with arm and mips, 89 # valgrind is not compatible with arm and mips,
89 # so remove related test cases if there is no valgrind. 90 # so remove related test cases if there is no valgrind.
@@ -91,6 +92,9 @@ do_install_ptest() {
91 sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile 92 sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
92 fi 93 fi
93 94
95 # install test-driver
96 install -m 644 ${S}/test-driver ${D}${PTEST_PATH}/${TESTDIR}
97
94 # install necessary links 98 # install necessary links
95 install -d ${D}${PTEST_PATH}/tools 99 install -d ${D}${PTEST_PATH}/tools
96 ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd 100 ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd