mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
sed: enable ptest support
Install sed test suite and run it as ptest. (From OE-Core rev: de8cc3192eefafa639a9f34fcc35799be3286191) Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
make -C testsuite -k runtest-TESTS
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
sed: add ptest
|
||||||
|
|
||||||
|
ptest needs buildtest-TESTS and runtest-TESTS targets.
|
||||||
|
serial-tests is required to generate those targets.
|
||||||
|
|
||||||
|
And fix following error after add serial-tests.
|
||||||
|
|
||||||
|
[snip]
|
||||||
|
help2man: can't get `--help' info from ../sed/sed
|
||||||
|
make[2]: *** [sed.1] Error 2
|
||||||
|
[snip]
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate
|
||||||
|
|
||||||
|
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
doc/Makefile.am | 2 +-
|
||||||
|
testsuite/Makefile.am | 6 ++++++
|
||||||
|
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 9d33ec9..4f0c532 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux)
|
||||||
|
AC_CONFIG_SRCDIR([sed/sed.c])
|
||||||
|
AM_CONFIG_HEADER(config.h:config_h.in)
|
||||||
|
AC_PREREQ(2.60)
|
||||||
|
-AM_INIT_AUTOMAKE
|
||||||
|
+AM_INIT_AUTOMAKE([serial-tests])
|
||||||
|
|
||||||
|
SED_FEATURE_VERSION=4.2.2
|
||||||
|
AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
|
||||||
|
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
||||||
|
index af6975c..6fd8c9a 100644
|
||||||
|
--- a/doc/Makefile.am
|
||||||
|
+++ b/doc/Makefile.am
|
||||||
|
@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
|
||||||
|
fi
|
||||||
|
echo stamp > $(srcdir)/s-texi
|
||||||
|
|
||||||
|
-sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
|
||||||
|
+_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
|
||||||
|
$(HELP2MAN) --name "stream editor for filtering and transforming text" \
|
||||||
|
-p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
|
||||||
|
|
||||||
|
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
|
||||||
|
index d80e72c..b05f01e 100644
|
||||||
|
--- a/testsuite/Makefile.am
|
||||||
|
+++ b/testsuite/Makefile.am
|
||||||
|
@@ -99,5 +99,11 @@ EXTRA_DIST = \
|
||||||
|
# automake makes `check' depend on $(TESTS). Declare
|
||||||
|
# dummy targets for $(TESTS) so that make does not complain.
|
||||||
|
|
||||||
|
+install-ptest:
|
||||||
|
+ cd $(BUILDDIR); tar -cf - $(TESTDIR) --exclude *.o | ( cd $(DESTDIR) && tar -xf - )
|
||||||
|
+ for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done
|
||||||
|
+ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile
|
||||||
|
+ for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done
|
||||||
|
+
|
||||||
|
.PHONY: $(SEDTESTS)
|
||||||
|
$(SEDTESTS):
|
||||||
|
--
|
||||||
|
1.7.9.5
|
||||||
|
|
||||||
@@ -5,14 +5,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
|
|||||||
file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
|
file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
|
||||||
SECTION = "console/utils"
|
SECTION = "console/utils"
|
||||||
|
|
||||||
SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz"
|
SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
|
||||||
|
file://sed-add-ptest.patch \
|
||||||
|
file://run-ptest \
|
||||||
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
|
SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
|
||||||
SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
|
SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
|
||||||
|
|
||||||
inherit autotools texinfo update-alternatives gettext
|
inherit autotools texinfo update-alternatives gettext ptest
|
||||||
|
RDEPENDS_${PN}-ptest += "make locale-base-ru-ru"
|
||||||
|
|
||||||
EXTRA_OECONF = "--disable-acl"
|
EXTRA_OECONF = "--disable-acl \
|
||||||
|
${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
autotools_do_install
|
autotools_do_install
|
||||||
@@ -25,4 +30,14 @@ ALTERNATIVE_${PN} = "sed"
|
|||||||
ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
|
ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
|
||||||
ALTERNATIVE_PRIORITY = "100"
|
ALTERNATIVE_PRIORITY = "100"
|
||||||
|
|
||||||
|
TESTDIR = "testsuite"
|
||||||
|
|
||||||
|
do_compile_ptest() {
|
||||||
|
oe_runmake -C ${TESTDIR} buildtest-TESTS
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_ptest() {
|
||||||
|
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
|
||||||
|
}
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native"
|
||||||
|
|||||||
Reference in New Issue
Block a user