diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-04-23 17:43:49 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-25 00:05:20 +0100 |
commit | 0ab0dacc1afe3453f74b0bbc8b15229f93f1c61f (patch) | |
tree | 25b41bf352de76dce008ea4174d020366792d7ff | |
parent | 3772725a45bc749340530fc8dd4d674a7ca79654 (diff) | |
download | poky-0ab0dacc1afe3453f74b0bbc8b15229f93f1c61f.tar.gz |
m4: add ptest support
add patch 0001-test-getopt-posix-fix.patch for fix test-getopt-posix
(From OE-Core rev: 6048f6787b0b6e98f8d16710ffb68fe10c41e0a2)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/m4/m4-1.4.18.inc | 37 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch | 41 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/run-ptest | 5 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/serial-tests-config.patch | 30 |
4 files changed, 110 insertions, 3 deletions
diff --git a/meta/recipes-devtools/m4/m4-1.4.18.inc b/meta/recipes-devtools/m4/m4-1.4.18.inc index a6cef6f328..f433b3f2dd 100644 --- a/meta/recipes-devtools/m4/m4-1.4.18.inc +++ b/meta/recipes-devtools/m4/m4-1.4.18.inc | |||
@@ -4,15 +4,18 @@ DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro process | |||
4 | compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \ | 4 | compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \ |
5 | GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc." | 5 | GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc." |
6 | 6 | ||
7 | inherit autotools texinfo | 7 | inherit autotools texinfo ptest |
8 | 8 | ||
9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ | 9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ |
10 | file://ac_config_links.patch \ | 10 | file://ac_config_links.patch \ |
11 | file://remove-gets.patch \ | 11 | file://remove-gets.patch \ |
12 | file://m4-1.4.18-glibc-change-work-around.patch \ | 12 | file://m4-1.4.18-glibc-change-work-around.patch \ |
13 | " | 13 | " |
14 | 14 | SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ | |
15 | SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch" | 15 | file://run-ptest \ |
16 | file://serial-tests-config.patch \ | ||
17 | file://0001-test-getopt-posix-fix.patch \ | ||
18 | " | ||
16 | 19 | ||
17 | SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28" | 20 | SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28" |
18 | SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab" | 21 | SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab" |
@@ -28,3 +31,31 @@ acpaths = "-I ./m4" | |||
28 | EXTRA_OECONF += "--without-libsigsegv-prefix" | 31 | EXTRA_OECONF += "--without-libsigsegv-prefix" |
29 | 32 | ||
30 | EXTRA_OEMAKE += "'infodir=${infodir}'" | 33 | EXTRA_OEMAKE += "'infodir=${infodir}'" |
34 | |||
35 | do_compile_ptest() { | ||
36 | cd ${B}/tests | ||
37 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile | ||
38 | oe_runmake buildtest-TESTS | ||
39 | } | ||
40 | |||
41 | do_install_ptest() { | ||
42 | cp -r ${B}/tests ${D}${PTEST_PATH} | ||
43 | cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ | ||
44 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile | ||
45 | sed -i -e "s;LOCALE_FR='fr_FR';LOCALE_FR='fr_FR.iso88591';g" \ | ||
46 | -e "s;LOCALE_FR_UTF8='none';LOCALE_FR_UTF8='fr_FR.utf8';g" ${D}${PTEST_PATH}/tests/Makefile | ||
47 | find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} | ||
48 | cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/ | ||
49 | sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh | ||
50 | chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \ | ||
51 | ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \ | ||
52 | ${D}${PTEST_PATH}/tests/test-xalloc-die | ||
53 | } | ||
54 | |||
55 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ | ||
56 | locale-base-fr-fr.iso-8859-1 \ | ||
57 | " | ||
58 | |||
59 | INSANE_SKIP_${PN}-ptest += "ldflags" | ||
60 | INSANE_SKIP_${PN}-ptest += "rpaths" | ||
61 | |||
diff --git a/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch b/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch new file mode 100644 index 0000000000..11508ee0e2 --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 75bea7c72a919859674f493548653de88f96c798 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Mon, 22 Apr 2019 10:36:13 +0800 | ||
4 | Subject: [PATCH] test-getopt-posix fix | ||
5 | |||
6 | fix below problem: | ||
7 | test-getopt.h:754: assertion 'strcmp (argv[1], "donald") == 0' failed | ||
8 | |||
9 | get this patch from | ||
10 | https://github.com/habitat-sh/core-plans/blob/master/m4/fix-test-getopt-posix-with-glibc-2.26.patch | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | have report this bug to m4-discuss@gnu.org | ||
15 | |||
16 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
17 | --- | ||
18 | tests/test-getopt-posix.c | 7 +++++++ | ||
19 | 1 file changed, 7 insertions(+) | ||
20 | |||
21 | diff --git a/tests/test-getopt-posix.c b/tests/test-getopt-posix.c | ||
22 | index 5532271..2a3d511 100644 | ||
23 | --- a/tests/test-getopt-posix.c | ||
24 | +++ b/tests/test-getopt-posix.c | ||
25 | @@ -22,6 +22,13 @@ | ||
26 | ftell link warning if we are not using the gnulib ftell module. */ | ||
27 | #define _GL_NO_LARGE_FILES | ||
28 | |||
29 | +/* | ||
30 | + * Glibc 2.26 does hard include bits/getopt_posix.h which causes the system | ||
31 | + * to use glibc's getopt but the tests expect gnulib behavior. Until a better | ||
32 | + * fix is available this avoids that mis-resolution. | ||
33 | + */ | ||
34 | +#include <getopt.h> | ||
35 | + | ||
36 | /* POSIX and glibc provide the getopt() function in <unistd.h>, see | ||
37 | http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html | ||
38 | https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html | ||
39 | -- | ||
40 | 2.7.4 | ||
41 | |||
diff --git a/meta/recipes-devtools/m4/m4/run-ptest b/meta/recipes-devtools/m4/m4/run-ptest new file mode 100644 index 0000000000..5c0fe93357 --- /dev/null +++ b/meta/recipes-devtools/m4/m4/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | #This script is used to run m4 test suites | ||
4 | cd tests | ||
5 | make -k runtest-TESTS top_srcdir=.. srcdir=. | ||
diff --git a/meta/recipes-devtools/m4/m4/serial-tests-config.patch b/meta/recipes-devtools/m4/m4/serial-tests-config.patch new file mode 100644 index 0000000000..34e6ad801e --- /dev/null +++ b/meta/recipes-devtools/m4/m4/serial-tests-config.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From ab8491111b4578db5b735c6466187775e1855f18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Tue, 23 Apr 2019 15:35:00 +0800 | ||
4 | Subject: [PATCH] add a patch to use serial-tests config needed by ptest | ||
5 | |||
6 | Add serial-tests support, ptest need it. | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe specific] | ||
9 | |||
10 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
11 | --- | ||
12 | configure.ac | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 78b8788..931fa6f 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]), | ||
20 | [bug-m4@gnu.org]) | ||
21 | AC_CONFIG_AUX_DIR([build-aux]) | ||
22 | |||
23 | -AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests | ||
24 | +AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests serial-tests | ||
25 | silent-rules subdir-objects gnu]) | ||
26 | AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. | ||
27 | |||
28 | -- | ||
29 | 2.7.4 | ||
30 | |||