aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2014-01-18 16:04:36 +0000
committerIain Buclaw <ibuclaw@gdcproject.org>2014-01-18 18:09:28 +0000
commit7f420862a712047fa2c0031ce42a28861ac43546 (patch)
tree6f3e2bfbe7b8b3c8165804a6e824ba5888e28231 /gdb/testsuite
parentd36b3012940ae4cb24d19359e6781efa2d92db41 (diff)
downloadgdb-7f420862a712047fa2c0031ce42a28861ac43546.zip
gdb-7f420862a712047fa2c0031ce42a28861ac43546.tar.gz
gdb-7f420862a712047fa2c0031ce42a28861ac43546.tar.bz2
Add gdb.dlang to the gdb testsuite for the purpose of creating D
specific tests. gdb/testsuite/ChangeLog: 2014-01-17 Iain Buclaw <ibuclaw@gdcproject.org> * configure.ac: Create gdb.dlang/Makefile. * configure: Regenerate. * Makefile.in (ALL_SUBDIRS): Add gdb.dlang. * gdb.dlang/Makefile.in: New file. * lib/d-support.exp: New file. * lib/gdb.exp (skip_d_tests): New proc.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog9
-rw-r--r--gdb/testsuite/Makefile.in2
-rwxr-xr-xgdb/testsuite/configure3
-rw-r--r--gdb/testsuite/configure.ac3
-rw-r--r--gdb/testsuite/gdb.dlang/Makefile.in15
-rw-r--r--gdb/testsuite/lib/d-support.exp34
-rw-r--r--gdb/testsuite/lib/gdb.exp6
7 files changed, 69 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6a9d8c0..a653a81 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2014-01-17 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * configure.ac: Create gdb.dlang/Makefile.
+ * configure: Regenerate.
+ * Makefile.in (ALL_SUBDIRS): Add gdb.dlang.
+ * gdb.dlang/Makefile.in: New file.
+ * lib/d-support.exp: New file.
+ * lib/gdb.exp (skip_d_tests): New proc.
+
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* gdb.btrace/delta.exp: Check reverse stepi.
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 2204a3c..7a44660 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -33,7 +33,7 @@ EXEEXT = @EXEEXT@
SUBDIRS = @subdirs@
RPATH_ENVVAR = @RPATH_ENVVAR@
ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.btrace gdb.cell gdb.cp \
- gdb.disasm gdb.dwarf2 gdb.fortran gdb.gdb gdb.go gdb.hp \
+ gdb.disasm gdb.dlang gdb.dwarf2 gdb.fortran gdb.gdb gdb.go gdb.hp \
gdb.java gdb.linespec gdb.mi gdb.modula2 gdb.multi \
gdb.objc gdb.opencl gdb.opt gdb.pascal gdb.python gdb.server \
gdb.stabs gdb.reverse gdb.threads gdb.trace gdb.xml \
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index da590f3..94542a6 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -3448,7 +3448,7 @@ done
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -4158,6 +4158,7 @@ do
"gdb.cp/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.cp/Makefile" ;;
"gdb.disasm/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.disasm/Makefile" ;;
"gdb.dwarf2/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.dwarf2/Makefile" ;;
+ "gdb.dlang/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.dlang/Makefile" ;;
"gdb.fortran/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.fortran/Makefile" ;;
"gdb.go/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.go/Makefile" ;;
"gdb.server/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.server/Makefile" ;;
diff --git a/gdb/testsuite/configure.ac b/gdb/testsuite/configure.ac
index f25b939..61d0bff 100644
--- a/gdb/testsuite/configure.ac
+++ b/gdb/testsuite/configure.ac
@@ -91,7 +91,8 @@ AC_OUTPUT([Makefile \
gdb.ada/Makefile \
gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile \
gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
- gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile \
+ gdb.dlang/Makefile gdb.fortran/Makefile gdb.go/Makefile \
+ gdb.server/Makefile gdb.java/Makefile \
gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile \
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile \
diff --git a/gdb/testsuite/gdb.dlang/Makefile.in b/gdb/testsuite/gdb.dlang/Makefile.in
new file mode 100644
index 0000000..5527c3e
--- /dev/null
+++ b/gdb/testsuite/gdb.dlang/Makefile.in
@@ -0,0 +1,15 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES =
+
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f *.dwo *.dwp
+ -rm -f core ${EXECUTABLES}
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log gdb.log gdb.sum
diff --git a/gdb/testsuite/lib/d-support.exp b/gdb/testsuite/lib/d-support.exp
new file mode 100644
index 0000000..fe86787
--- /dev/null
+++ b/gdb/testsuite/lib/d-support.exp
@@ -0,0 +1,34 @@
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Auxiliary function to set the language to D.
+# The result is 1 (true) for success, 0 (false) for failure.
+
+proc set_lang_d {} {
+ if [gdb_test_no_output "set language d"] {
+ return 0
+ }
+ if [gdb_test "show language" ".* source language is \"d\"." \
+ "set language to \"d\""] {
+ return 0
+ }
+ return 1
+}
+
+# D version of runto_main.
+
+proc d_runto_main { } {
+ return [runto _Dmain]
+}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 8559b59..3716472 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1568,6 +1568,12 @@ proc skip_java_tests {} {
return 0
}
+# Return a 1 if I don't even want to try to test D.
+
+proc skip_d_tests {} {
+ return 0
+}
+
# Return a 1 for configurations that do not support Python scripting.
proc skip_python_tests {} {