summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gdbm/files
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@enea.com>2014-05-04 16:02:07 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-06 17:59:16 +0100
commit8b91e4462b84e4b7dfb8d935f11f8600d5991edc (patch)
tree2f368cb1d41c9b57997370218b4057cd3086a4d0 /meta/recipes-support/gdbm/files
parent563c3290b0d3293bd1c7ae83be017e390f3b5db4 (diff)
downloadpoky-8b91e4462b84e4b7dfb8d935f11f8600d5991edc.tar.gz
gdbm: enable ptest support
Install gdbm test-suite and run it as ptest (From OE-Core rev: aaba69d598763831e8b42996154ed87d0db10714) Signed-off-by: Maxin B. John <maxin.john@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/gdbm/files')
-rw-r--r--meta/recipes-support/gdbm/files/ptest.patch36
-rwxr-xr-xmeta/recipes-support/gdbm/files/run-ptest7
2 files changed, 43 insertions, 0 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 @@
1Add install-ptest rules.
2
3Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
4Signed-off-by: Maxin B. John <maxin.john@enea.com>
5Upstream-Status: Pending
6
7diff -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
19diff -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
5cd 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/'