rsyslog: fix ptest
PATCH 1/1 rsyslog: fix ptest
From: Wenzong Fan <[email protected]>
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'.
--- meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest | 2 +- meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-)
meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest +1 -1
@@ -1,3 +1,3 @@ #!/bin/sh # -make -C tests -k runtest-TESTS +make -C tests -k check-TESTS
meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb +6 -2
@@ -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
Signature · 1 line
1.9.1