summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuhammad Shakeel <muhammad_shakeel@mentor.com>2013-07-05 12:23:18 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-29 13:08:59 +0100
commit3f7e8ad53e27b441125d232a387acb838e3feffd (patch)
tree68c0fe3a353a26d203c8571a45e40a377fcd192d
parentd921c0a0032a63cc1848726d5e31ed81fd6281d0 (diff)
downloadpoky-3f7e8ad53e27b441125d232a387acb838e3feffd.tar.gz
bash: Add ptest
ptest support was already added for v4.2 but for the distros using GPLv2 version of bash (3.2.48) this update is required. (From OE-Core rev: d054da760deda0c965619372209b50f8db964e1c) Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/build-tests.patch44
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/run-ptest2
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/test-output.patch25
-rw-r--r--meta/recipes-extended/bash/bash_3.2.48.bb3
4 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
new file mode 100644
index 0000000000..91341ee696
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
@@ -0,0 +1,44 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2
3Signed-off-by: Anders Roxell <anders.roxell@enea.com>
4Upstream-Status: Pending
5---
6diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
7--- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500
8+++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500
9@@ -803,17 +803,31 @@
10 fi
11
12 recho$(EXEEXT): $(SUPPORT_SRC)recho.c
13- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
14+ @$(CC) $(CCFLAGS) -o $@ $<
15
16 zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
17- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
18+ @$(CC) $(CCFLAGS) -o $@ $<
19
20 printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
21- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
22+ @$(CC) $(CCFLAGS) -o $@ $<
23
24-test tests check: force $(Program) $(TESTS_SUPPORT)
25+test tests check:
26+ @$(MAKE) install-test
27+ @$(MAKE) runtest
28+
29+install-test: buildtest
30+ifeq ($(origin INSTALL_TEST_DIR), undefined)
31 @-test -d tests || mkdir tests
32 @cp $(TESTS_SUPPORT) tests
33+else
34+ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
35+ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
36+ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
37+endif
38+
39+buildtest: force $(Program) $(TESTS_SUPPORT)
40+
41+runtest:
42 @( cd $(srcdir)/tests && \
43 PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
44
diff --git a/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
new file mode 100644
index 0000000000..8dd3b9981d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
new file mode 100644
index 0000000000..2b09b7d977
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
@@ -0,0 +1,25 @@
1Add FAIL/PASS output to test output.
2
3Signed-off-by: Björn Stenberg <bjst@enea.com>
4Upstream-Status: Pending
5---
6diff -uNr a/tests/run-all b/tests/run-all
7--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
8+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
9@@ -22,7 +22,15 @@
10 case $x in
11 $0|run-minimal|run-gprof) ;;
12 *.orig|*~) ;;
13- *) echo $x ; sh $x ;;
14+ *) echo $x
15+ output=`sh $x`
16+ if [ -n "$output" ]; then
17+ echo "$output"
18+ echo "FAIL: $x"
19+ else
20+ echo "PASS: $x"
21+ fi
22+ ;;
23 esac
24 done
25
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
index 4e6f0f3ea1..fe04b28e7c 100644
--- a/meta/recipes-extended/bash/bash_3.2.48.bb
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -10,6 +10,9 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
10 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \ 10 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
11 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \ 11 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \
12 file://mkbuiltins_have_stringize.patch \ 12 file://mkbuiltins_have_stringize.patch \
13 file://build-tests.patch \
14 file://test-output.patch \
15 file://run-ptest \
13 " 16 "
14 17
15SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8" 18SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"