summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files
diff options
context:
space:
mode:
authorMingli Yu <Mingli.Yu@windriver.com>2019-04-16 16:05:00 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-23 23:30:19 +0100
commit073556fa8c6e95ebd1cd97d5226b8b9e743fe4e0 (patch)
treea0d1f632f06533adf4d75f658ac14db4c337122c /meta/recipes-devtools/elfutils/files
parentf0d4ef3cdcf803aab2acf3c40dea8bfec44dc01c (diff)
downloadpoky-073556fa8c6e95ebd1cd97d5226b8b9e743fe4e0.tar.gz
elfutils: add ptest support
Add testsuite-ignore-elflint.diff from debian (http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz) to fix below ptest failure: | ./run-strip-strmerge.sh: line 33: testrun_on_self_skip: command not found | FAIL: run-strip-strmerge.sh Add check for gcc for two test cases such as run-strip-nothing.sh and run-strip-g.sh which depends on gcc at run time. (From OE-Core rev: 240e6b8819aab3bf74cdde92934be337e766aa75) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/files')
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch45
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff52
-rw-r--r--meta/recipes-devtools/elfutils/files/run-ptest6
-rw-r--r--meta/recipes-devtools/elfutils/files/serial-tests.patch28
4 files changed, 131 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
new file mode 100644
index 0000000000..67ca0e4c77
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
@@ -0,0 +1,45 @@
1From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Fri, 12 Apr 2019 16:29:58 +0800
4Subject: [PATCH] skip the test when gcc not deployed
5
6Skip the tests which depend on gcc when
7gcc not deployed.
8
9Upstream-Status: Inappropriate [oe specific]
10
11Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
12---
13 tests/run-strip-g.sh | 2 ++
14 tests/run-strip-nothing.sh | 2 ++
15 2 files changed, 4 insertions(+)
16
17diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
18index 1303819..a943dec 100755
19--- a/tests/run-strip-g.sh
20+++ b/tests/run-strip-g.sh
21@@ -24,6 +24,8 @@
22
23 tempfiles a.out strip.out debug.out readelf.out
24
25+# skip the test if gcc deployed
26+which gcc || exit 77
27 echo Create debug a.out.
28 echo "int main() { return 1; }" | gcc -g -xc -
29
30diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh
31index 914fdfb..d03f734 100755
32--- a/tests/run-strip-nothing.sh
33+++ b/tests/run-strip-nothing.sh
34@@ -22,6 +22,8 @@
35
36 tempfiles a.out strip.out debug.out
37
38+# skip the case if no gcc deployed
39+which gcc || exit 77
40 # Create no-debug a.out.
41 echo "int main() { return 1; }" | gcc -s -xc -
42
43--
442.7.4
45
diff --git a/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
new file mode 100644
index 0000000000..c4ce20c8a3
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
@@ -0,0 +1,52 @@
1From 03a343c6b1b72598fce654b8a638f106da44abfb Mon Sep 17 00:00:00 2001
2From: OpenEmbedded <oe.patch@oe>
3Date: Fri, 12 Apr 2019 08:05:50 +0000
4Subject: [PATCH] On many architectures this test fails because binaries/libs
5 produced by binutils don't pass elflint. However elfutils shouldn't FTBFS
6 because of this.
7
8So we run the tests on all archs to see what breaks, but if it breaks we ignore
9the result (exitcode 77 means: this test was skipped).
10
11Upstream-Status: Inappropriate [oe specific]
12
13Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
14---
15 tests/run-elflint-self.sh | 2 +-
16 tests/test-subr.sh | 15 +++++++++++++++
17 2 files changed, 16 insertions(+), 1 deletion(-)
18
19diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh
20index 58fa7d0..85d21a5 100755
21--- a/tests/run-elflint-self.sh
22+++ b/tests/run-elflint-self.sh
23@@ -18,5 +18,5 @@
24
25 . $srcdir/test-subr.sh
26
27-testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
28+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
29 testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
30diff --git a/tests/test-subr.sh b/tests/test-subr.sh
31index 09f428d..26f61f1 100644
32--- a/tests/test-subr.sh
33+++ b/tests/test-subr.sh
34@@ -201,3 +201,18 @@ testrun_on_self_quiet()
35 # Only exit if something failed
36 if test $exit_status != 0; then exit $exit_status; fi
37 }
38+
39+# Same as testrun_on_self(), but skip on failure.
40+testrun_on_self_skip()
41+{
42+ exit_status=0
43+
44+ for file in $self_test_files; do
45+ testrun $* $file \
46+ || { echo "*** failure in $* $file"; exit_status=77; }
47+ done
48+
49+ # Only exit if something failed
50+ if test $exit_status != 0; then exit $exit_status; fi
51+}
52+
diff --git a/meta/recipes-devtools/elfutils/files/run-ptest b/meta/recipes-devtools/elfutils/files/run-ptest
new file mode 100644
index 0000000000..770a62e731
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/run-ptest
@@ -0,0 +1,6 @@
1#!/bin/sh
2#
3#This script is used to run elfutils test suites
4cd tests
5
6make -k runtest-TESTS abs_srcdir=$PWD abs_builddir=$PWD bindir=$PWD/../src/ srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed
diff --git a/meta/recipes-devtools/elfutils/files/serial-tests.patch b/meta/recipes-devtools/elfutils/files/serial-tests.patch
new file mode 100644
index 0000000000..4b448cd50a
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/serial-tests.patch
@@ -0,0 +1,28 @@
1From 48e111a17e8d5f10690716a63c17670f1406b56c Mon Sep 17 00:00:00 2001
2From: "Hongjun.Yang" <hongjun.yang@windriver.com>
3Date: Wed, 28 Oct 2015 13:24:54 +0800
4Subject: [PATCH] Add serial-tests support, ptest need it.
5
6Add serial-tests support, ptest need it.
7
8Upstream-Status: Inappropriate [oe specific]
9
10Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
11
12---
13 configure.ac | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/configure.ac b/configure.ac
17index b4e012d..2eb0417 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 The elfutils developers.])
21 AC_PREREQ(2.63) dnl Minimum Autoconf version required.
22
23 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
24-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
25+AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
26 AM_MAINTAINER_MODE
27
28 AM_SILENT_RULES([yes])