diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-support/gdbm/files/ptest.patch | 36 | ||||
-rwxr-xr-x | meta/recipes-support/gdbm/files/run-ptest | 7 | ||||
-rw-r--r-- | meta/recipes-support/gdbm/gdbm_1.11.bb | 13 |
3 files changed, 54 insertions, 2 deletions
diff --git a/meta/recipes-support/gdbm/files/ptest.patch b/meta/recipes-support/gdbm/files/ptest.patch new file mode 100644 index 0000000000..65236fb48b --- /dev/null +++ b/meta/recipes-support/gdbm/files/ptest.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Add install-ptest rules. | ||
2 | |||
3 | Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> | ||
4 | Signed-off-by: Maxin B. John <maxin.john@enea.com> | ||
5 | Upstream-Status: Pending | ||
6 | |||
7 | diff -ur a/Makefile.am b/Makefile.am | ||
8 | --- a/Makefile.am 2011-08-16 10:13:10.000000000 +0200 | ||
9 | +++ b/Makefile.am 2013-04-12 18:02:16.473715873 +0200 | ||
10 | @@ -31,3 +31,8 @@ | ||
11 | d=`date '+%d/%m/%Y'`; \ | ||
12 | sed 's|/\*@DIST_DATE@\*/|"'"$$d"'"|' $(srcdir)/src/version.c > \ | ||
13 | $(distdir)/src/version.c | ||
14 | + | ||
15 | +install-ptest: | ||
16 | + @for subdir in $(SUBDIRS); do \ | ||
17 | + $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \ | ||
18 | + done | ||
19 | diff -ur a/tests/Makefile.am b/tests/Makefile.am | ||
20 | --- a/tests/Makefile.am 2011-11-11 19:39:42.000000000 +0100 | ||
21 | +++ b/tests/Makefile.am 2013-04-12 18:30:57.066301037 +0200 | ||
22 | @@ -132,4 +132,14 @@ | ||
23 | dtdel_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la | ||
24 | d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la | ||
25 | |||
26 | +buildtests: $(check_PROGRAMS) $(TESTSUITE) | ||
27 | |||
28 | +install-ptest: $(check_PROGRAMS) $(TESTSUITE) | ||
29 | + @$(INSTALL) -d $(DESTDIR) | ||
30 | + @for file in $^; do \ | ||
31 | + if [ -x .libs/$$file ]; then \ | ||
32 | + $(INSTALL_PROGRAM) .libs/$$file $(DESTDIR)/$$file; \ | ||
33 | + else \ | ||
34 | + $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \ | ||
35 | + fi \ | ||
36 | + done | ||
diff --git a/meta/recipes-support/gdbm/files/run-ptest b/meta/recipes-support/gdbm/files/run-ptest new file mode 100755 index 0000000000..615da8444b --- /dev/null +++ b/meta/recipes-support/gdbm/files/run-ptest | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # This script is used to run the gmdb test suite | ||
4 | |||
5 | cd tests | ||
6 | |||
7 | ./testsuite AUTOTEST_PATH=$PWD abs_builddir=$PWD COMPAT=1 | sed 's/^[^0-9]*\([0-9]\+\): \(.*\)\(ok\|pass\|skipped\|fail\|FAILED\)\(.*\)$/\3: \2 \4/;s/ \+/ /g;s/^ok/PASS/;s/^skipped/SKIP/;s/^fail/FAIL/;s/^FAILED/FAIL/' | ||
diff --git a/meta/recipes-support/gdbm/gdbm_1.11.bb b/meta/recipes-support/gdbm/gdbm_1.11.bb index 3d02594881..adf8c5bd38 100644 --- a/meta/recipes-support/gdbm/gdbm_1.11.bb +++ b/meta/recipes-support/gdbm/gdbm_1.11.bb | |||
@@ -5,12 +5,15 @@ LICENSE = "GPLv3" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24" |
6 | 6 | ||
7 | 7 | ||
8 | SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz" | 8 | SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ |
9 | file://run-ptest \ | ||
10 | file://ptest.patch \ | ||
11 | " | ||
9 | 12 | ||
10 | SRC_URI[md5sum] = "72c832680cf0999caedbe5b265c8c1bd" | 13 | SRC_URI[md5sum] = "72c832680cf0999caedbe5b265c8c1bd" |
11 | SRC_URI[sha256sum] = "8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3" | 14 | SRC_URI[sha256sum] = "8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3" |
12 | 15 | ||
13 | inherit autotools gettext texinfo lib_package | 16 | inherit autotools gettext texinfo lib_package ptest |
14 | 17 | ||
15 | # Needed for dbm python module | 18 | # Needed for dbm python module |
16 | EXTRA_OECONF = "-enable-libgdbm-compat" | 19 | EXTRA_OECONF = "-enable-libgdbm-compat" |
@@ -28,6 +31,12 @@ do_install_append () { | |||
28 | ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h | 31 | ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h |
29 | } | 32 | } |
30 | 33 | ||
34 | RDEPENDS_${PN}-ptest += "diffutils" | ||
35 | |||
36 | do_compile_ptest() { | ||
37 | oe_runmake -C tests buildtests | ||
38 | } | ||
39 | |||
31 | PACKAGES =+ "${PN}-compat \ | 40 | PACKAGES =+ "${PN}-compat \ |
32 | " | 41 | " |
33 | FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \ | 42 | FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \ |