From 9b3c8a18e0b8f995100bde7a9b4363a9044ecd10 Mon Sep 17 00:00:00 2001 From: Paul Vaduva Date: Fri, 4 Dec 2015 17:42:14 +0100 Subject: gdb: Add ptest Signed-off-by: Paul Vaduva Signed-off-by: George Nita --- .../gdb/0001-add-delay-before-run-exp-file.patch | 26 ++++++++++++++ .../0002-function-name-is-used-by-mistake.patch | 30 ++++++++++++++++ .../change-scripts-support-from-ksh-to-bash.patch | 14 ++++++++ recipes-devtools/gdb/gdb/gdb-ptest-attach.patch | 30 ++++++++++++++++ recipes-devtools/gdb/gdb/run-ptest | 2 ++ recipes-devtools/gdb/gdb/runtest-flags.patch | 30 ++++++++++++++++ recipes-devtools/gdb/gdb_7.7.1.bbappend | 40 ++++++++++++++++++++++ 7 files changed, 172 insertions(+) create mode 100644 recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch create mode 100644 recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch create mode 100644 recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch create mode 100644 recipes-devtools/gdb/gdb/gdb-ptest-attach.patch create mode 100755 recipes-devtools/gdb/gdb/run-ptest create mode 100644 recipes-devtools/gdb/gdb/runtest-flags.patch create mode 100644 recipes-devtools/gdb/gdb_7.7.1.bbappend (limited to 'recipes-devtools') 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 @@ +Description: Add delay for stable running + +Author: jack zhang +Date: Mon, 12 Nov 2012 04:10:20 +0100 + +Upstream-Status: Pending + +Signed-off-by: jack zhang +Signed-off-by: Ciprian Barbu +--- + gdb/testsuite/dg-extract-results.sh | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/gdb/testsuite/dg-extract-results.sh b/gdb/testsuite/dg-extract-results.sh +--- a/gdb/testsuite/dg-extract-results.sh ++++ b/gdb/testsuite/dg-extract-results.sh +@@ -322,6 +322,7 @@ END { + n=1 + while (n < expfileno) { + if (expfileseen[expfiles[n]]) { ++ sleep 1 + print "Running "expfiles[n]" ..." + if (filewritten["${TMP}/list"n]) { + if (expfileseen[expfiles[n]] == 1) +-- +1.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 @@ +Description: function name is used by mistake + +Author: jack zhang +Date: Tue, 13 Nov 2012 09:56:54 +0100 + +Upstream-Status: Pending + +Signed-off-by: jack zhang +Signed-off-by: Ciprian Barbu +--- + gdb/testsuite/gdb.base/skip.exp | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp +--- a/gdb/testsuite/gdb.base/skip.exp ++++ b/gdb/testsuite/gdb.base/skip.exp +@@ -113,9 +113,9 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \ + "info skip shows entry as disabled" + + if ![runto_main] { fail "skip tests suppressed" } +-gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)" ++gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (1)" + gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo() +-gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)" ++gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (3)" + gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar() + gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)" + +-- +1.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 @@ +Avoid ksh dependency + +Upstream-Status: Pending + +Signed-off-by: Paul Vaduva +diff -Naur a/gdb/testsuite/gdb.hp/tools/odump b/gdb/testsuite/gdb.hp/tools/odump +--- a/gdb/testsuite/gdb.hp/tools/odump 2015-05-25 10:13:31.956107840 +0200 ++++ b/gdb/testsuite/gdb.hp/tools/odump 2015-05-25 10:14:04.690707176 +0200 +@@ -1,4 +1,4 @@ +-#!/bin/ksh ++#!/bin/bash + + # First source /app/appserver + . /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 @@ +From f442dc426b0346e1e413a7c3ae5b07725837135c Mon Sep 17 00:00:00 2001 +From: "Rick.Yang" +Date: Sun, 11 Nov 2012 10:05:50 +0100 +Subject: [PATCH] Fix the failed test case. + +Description: Fixed failing test case + In fact, the test case is passing, but the output does not completely + match the expected pattern in some special case. Modified the pattern + to resolve it. + +Signed-off-by: Rick.Yang +Signed-off-by: Ciprian Barbu +--- + gdb/testsuite/gdb.base/attach.exp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp +--- a/gdb/testsuite/gdb.base/attach.exp ++++ b/gdb/testsuite/gdb.base/attach.exp +@@ -285,7 +285,7 @@ proc do_attach_tests {} { + gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \ + "set source path" + +- gdb_test "cd /tmp" "Working directory /tmp." \ ++ gdb_test "cd /tmp" "Working directory /tmp.*" \ + "cd away from process working directory" + + # Explicitly flush out any knowledge of the previous attachment. +-- +1.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 @@ +#!/bin/sh +make -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 @@ +Description: add -a to runtest + Pass "-a" to runtest so that everything is printed to output + (e.g. unsupported test cases) + +Author: "Gordon.Sun" +Date: Wed, 28 Nov 2012 03:39:58 +0100 + +Upstream-Status: Inappropriate (other) + +Signed-off-by: Gordon.Sun +Signed-off-by: Ciprian Barbu +--- + gdb/testsuite/Makefile.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in +index fab124e..f5cddb2 100644 +--- a/gdb/testsuite/Makefile.in ++++ b/gdb/testsuite/Makefile.in +@@ -46,7 +46,7 @@ EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \ + + RUNTEST = $(RUNTEST_FOR_TARGET) + +-RUNTESTFLAGS = ++RUNTESTFLAGS = -a + + FORCE_PARALLEL = + +-- +1.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 @@ +inherit ptest + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://run-ptest \ + file://runtest-flags.patch \ + file://0001-add-delay-before-run-exp-file.patch \ + file://0002-function-name-is-used-by-mistake.patch \ + file://gdb-ptest-attach.patch \ + file://change-scripts-support-from-ksh-to-bash.patch \ + " + + + +DEPENDS_${PN}-ptest += "expect dejagnu tcl" +RDEPENDS_${PN}-ptest += "glibc-charmap-ibm1047 \ + glibc-gconv-ibm1047 \ + glibc-charmap-ebcdic-us \ + glibc-gconv-ebcdic-us \ + glibc-gconv-utf-32 \ + glibc-gconv-utf-16 \ + prelink \ + expect \ + dejagnu \ + make \ + bash \ + " +do_configure_ptest () { + cd ${S}/gdb/testsuite/ + ./configure --host=${HOST_SYS} --build=${BUILD_SYS} + make site.exp +} + +do_install_ptest () { + cp -pr ${S}/gdb/testsuite/ ${D}${PTEST_PATH} + cp -pr ${S}/gdb/features/ ${D}${PTEST_PATH} + install -p ${S}/config.sub ${D}${PTEST_PATH}/testsuite/ + install -p ${S}/config.guess ${D}${PTEST_PATH}/testsuite/ + install -p ${S}/install-sh ${D}${PTEST_PATH}/testsuite/ +} -- cgit v1.2.3-54-g00ecf