summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorPaul Vaduva <Paul.Vaduva@enea.com>2015-12-04 17:42:14 +0100
committerGeorge Nita <george.nita@enea.com>2015-12-07 10:20:47 +0100
commit9b3c8a18e0b8f995100bde7a9b4363a9044ecd10 (patch)
treeea9349a4b28089abcd9496be1893667c7662a391 /recipes-devtools
parent8d7d20f1ae6c10ef37723572b535c5c22814461e (diff)
downloadmeta-el-common-9b3c8a18e0b8f995100bde7a9b4363a9044ecd10.tar.gz
gdb: Add ptest
Signed-off-by: Paul Vaduva <Paul.Vaduva@enea.com> Signed-off-by: George Nita <george.nita@enea.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch26
-rw-r--r--recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch30
-rw-r--r--recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch14
-rw-r--r--recipes-devtools/gdb/gdb/gdb-ptest-attach.patch30
-rwxr-xr-xrecipes-devtools/gdb/gdb/run-ptest2
-rw-r--r--recipes-devtools/gdb/gdb/runtest-flags.patch30
-rw-r--r--recipes-devtools/gdb/gdb_7.7.1.bbappend40
7 files changed, 172 insertions, 0 deletions
diff --git a/recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch b/recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch
new file mode 100644
index 0000000..1c41562
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch
@@ -0,0 +1,26 @@
1Description: Add delay for stable running
2
3Author: jack zhang <jack.zhang@enea.com>
4Date: Mon, 12 Nov 2012 04:10:20 +0100
5
6Upstream-Status: Pending
7
8Signed-off-by: jack zhang <jack.zhang@enea.com>
9Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
10---
11 gdb/testsuite/dg-extract-results.sh | 1 +
12 1 files changed, 1 insertions(+), 0 deletions(-)
13
14diff --git a/gdb/testsuite/dg-extract-results.sh b/gdb/testsuite/dg-extract-results.sh
15--- a/gdb/testsuite/dg-extract-results.sh
16+++ b/gdb/testsuite/dg-extract-results.sh
17@@ -322,6 +322,7 @@ END {
18 n=1
19 while (n < expfileno) {
20 if (expfileseen[expfiles[n]]) {
21+ sleep 1
22 print "Running "expfiles[n]" ..."
23 if (filewritten["${TMP}/list"n]) {
24 if (expfileseen[expfiles[n]] == 1)
25--
261.7.5.4
diff --git a/recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch b/recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch
new file mode 100644
index 0000000..7f25a35
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch
@@ -0,0 +1,30 @@
1Description: function name is used by mistake
2
3Author: jack zhang <jack.zhang@enea.com>
4Date: Tue, 13 Nov 2012 09:56:54 +0100
5
6Upstream-Status: Pending
7
8Signed-off-by: jack zhang <jack.zhang@enea.com>
9Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
10---
11 gdb/testsuite/gdb.base/skip.exp | 4 ++--
12 1 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
15--- a/gdb/testsuite/gdb.base/skip.exp
16+++ b/gdb/testsuite/gdb.base/skip.exp
17@@ -113,9 +113,9 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
18 "info skip shows entry as disabled"
19
20 if ![runto_main] { fail "skip tests suppressed" }
21-gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
22+gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (1)"
23 gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
24-gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
25+gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (3)"
26 gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
27 gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
28
29--
301.7.5.4
diff --git a/recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch b/recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch
new file mode 100644
index 0000000..d98affc
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch
@@ -0,0 +1,14 @@
1Avoid ksh dependency
2
3Upstream-Status: Pending
4
5Signed-off-by: Paul Vaduva <paul.vaduva@enea.com>
6diff -Naur a/gdb/testsuite/gdb.hp/tools/odump b/gdb/testsuite/gdb.hp/tools/odump
7--- a/gdb/testsuite/gdb.hp/tools/odump 2015-05-25 10:13:31.956107840 +0200
8+++ b/gdb/testsuite/gdb.hp/tools/odump 2015-05-25 10:14:04.690707176 +0200
9@@ -1,4 +1,4 @@
10-#!/bin/ksh
11+#!/bin/bash
12
13 # First source /app/appserver
14 . /app/appserver
diff --git a/recipes-devtools/gdb/gdb/gdb-ptest-attach.patch b/recipes-devtools/gdb/gdb/gdb-ptest-attach.patch
new file mode 100644
index 0000000..b95ac2c
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/gdb-ptest-attach.patch
@@ -0,0 +1,30 @@
1From f442dc426b0346e1e413a7c3ae5b07725837135c Mon Sep 17 00:00:00 2001
2From: "Rick.Yang" <rick.yang@enea.com>
3Date: Sun, 11 Nov 2012 10:05:50 +0100
4Subject: [PATCH] Fix the failed test case.
5
6Description: Fixed failing test case
7 In fact, the test case is passing, but the output does not completely
8 match the expected pattern in some special case. Modified the pattern
9 to resolve it.
10
11Signed-off-by: Rick.Yang <rick.yang@enea.com>
12Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
13---
14 gdb/testsuite/gdb.base/attach.exp | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
18--- a/gdb/testsuite/gdb.base/attach.exp
19+++ b/gdb/testsuite/gdb.base/attach.exp
20@@ -285,7 +285,7 @@ proc do_attach_tests {} {
21 gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \
22 "set source path"
23
24- gdb_test "cd /tmp" "Working directory /tmp." \
25+ gdb_test "cd /tmp" "Working directory /tmp.*" \
26 "cd away from process working directory"
27
28 # Explicitly flush out any knowledge of the previous attachment.
29--
301.7.5.4
diff --git a/recipes-devtools/gdb/gdb/run-ptest b/recipes-devtools/gdb/gdb/run-ptest
new file mode 100755
index 0000000..e8587e8
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -C testsuite check-single | sed -e 's/XFAIL/PASS/' -e 's/UNRESOLVED/SKIP/' -e 's/UNTESTED/SKIP/' -e 's/UNSUPPORTED/SKIP/'
diff --git a/recipes-devtools/gdb/gdb/runtest-flags.patch b/recipes-devtools/gdb/gdb/runtest-flags.patch
new file mode 100644
index 0000000..054abc3
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/runtest-flags.patch
@@ -0,0 +1,30 @@
1Description: add -a to runtest
2 Pass "-a" to runtest so that everything is printed to output
3 (e.g. unsupported test cases)
4
5Author: "Gordon.Sun" <gordon.sun@enea.com>
6Date: Wed, 28 Nov 2012 03:39:58 +0100
7
8Upstream-Status: Inappropriate (other)
9
10Signed-off-by: Gordon.Sun <gordon.sun@enea.com>
11Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
12---
13 gdb/testsuite/Makefile.in | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
17index fab124e..f5cddb2 100644
18--- a/gdb/testsuite/Makefile.in
19+++ b/gdb/testsuite/Makefile.in
20@@ -46,7 +46,7 @@ EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
21
22 RUNTEST = $(RUNTEST_FOR_TARGET)
23
24-RUNTESTFLAGS =
25+RUNTESTFLAGS = -a
26
27 FORCE_PARALLEL =
28
29--
301.7.5.4
diff --git a/recipes-devtools/gdb/gdb_7.7.1.bbappend b/recipes-devtools/gdb/gdb_7.7.1.bbappend
new file mode 100644
index 0000000..2da31a0
--- /dev/null
+++ b/recipes-devtools/gdb/gdb_7.7.1.bbappend
@@ -0,0 +1,40 @@
1inherit ptest
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4
5SRC_URI += "file://run-ptest \
6 file://runtest-flags.patch \
7 file://0001-add-delay-before-run-exp-file.patch \
8 file://0002-function-name-is-used-by-mistake.patch \
9 file://gdb-ptest-attach.patch \
10 file://change-scripts-support-from-ksh-to-bash.patch \
11 "
12
13
14
15DEPENDS_${PN}-ptest += "expect dejagnu tcl"
16RDEPENDS_${PN}-ptest += "glibc-charmap-ibm1047 \
17 glibc-gconv-ibm1047 \
18 glibc-charmap-ebcdic-us \
19 glibc-gconv-ebcdic-us \
20 glibc-gconv-utf-32 \
21 glibc-gconv-utf-16 \
22 prelink \
23 expect \
24 dejagnu \
25 make \
26 bash \
27 "
28do_configure_ptest () {
29 cd ${S}/gdb/testsuite/
30 ./configure --host=${HOST_SYS} --build=${BUILD_SYS}
31 make site.exp
32}
33
34do_install_ptest () {
35 cp -pr ${S}/gdb/testsuite/ ${D}${PTEST_PATH}
36 cp -pr ${S}/gdb/features/ ${D}${PTEST_PATH}
37 install -p ${S}/config.sub ${D}${PTEST_PATH}/testsuite/
38 install -p ${S}/config.guess ${D}${PTEST_PATH}/testsuite/
39 install -p ${S}/install-sh ${D}${PTEST_PATH}/testsuite/
40}