mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
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>
This commit is contained in:
parent
8684b379bc
commit
e29f64293c
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
make -C tests -k runtest-TESTS
|
||||
make -C tests -k check-TESTS
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
|
|||
|
||||
TESTDIR = "tests"
|
||||
do_compile_ptest() {
|
||||
sed -i 's/\(^buildtest-TESTS: \)/\1 $(check_PROGRAMS) /' ${TESTDIR}/Makefile
|
||||
echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
|
||||
oe_runmake -C ${TESTDIR} buildtest-TESTS
|
||||
}
|
||||
|
||||
|
|
@ -82,8 +82,9 @@ do_install_ptest() {
|
|||
# do NOT need to rebuild Makefile itself
|
||||
sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
|
||||
# fix the srcdir
|
||||
# fix the srcdir, top_srcdir
|
||||
sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
|
||||
# valgrind is not compatible with arm and mips,
|
||||
# so remove related test cases if there is no valgrind.
|
||||
|
|
@ -91,6 +92,9 @@ do_install_ptest() {
|
|||
sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
fi
|
||||
|
||||
# install test-driver
|
||||
install -m 644 ${S}/test-driver ${D}${PTEST_PATH}/${TESTDIR}
|
||||
|
||||
# install necessary links
|
||||
install -d ${D}${PTEST_PATH}/tools
|
||||
ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user