This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 3/3] MI: tests for -catch-load/-catch-unload


On 11/19/2012 10:49 PM, Mircea Gherzan wrote:
From: Keven Boell <keven.boell@intel.com>

Added basic MI tests for the -catch-load and
-catch-unload MI commands.

2012-11-19 Keven Boell <keven.boell@intel.com>

gdb/testsuite/gdb.mi:
	* mi-catch-load-so.c (New file): Clone of the

The changelog file for all testsuite is placed in gdb/testsuite, so we should move 'gdb.mi' into the file name of changelog entry, like


* gdb.mi/mi-catch-load-so.c:

	catch load test library source file.
	* mi-catch-load.c (New file): Clone of the catch
	load test source file.

Usually, we put the name of modified function or variable into the "()" in ChangeLog entry. Since new files are added here, we can say something like,


	* gdb.mi/mi-catch-load.c: New.  Clone of the catch
	load test source file.

	* mi-catch-load.exp (New file): Test file for
	basic MI -catch-load and -catch-unload tests.

Likewise.



diff --git a/gdb/testsuite/gdb.mi/mi-catch-load.exp b/gdb/testsuite/gdb.mi/mi-catch-load.exp
new file mode 100755
index 0000000..500b23b
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-catch-load.exp
@@ -0,0 +1,91 @@
+# Copyright 2012 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/>.
+#
+load_lib mi-support.exp
+
+gdb_exit
+if [mi_gdb_start] {
+    continue
+}
+
+if {[get_compiler_info]} {
+    warning "Could not get compiler info"
+    untested mi-catch-load.exp
+    return -1
+}
+
+if {[skip_shlib_tests]} {
+    untested "mi-catch-load.exp"
+    return -1
+}
+

We can check this at the very beginning, and 'untested "mi-catch-load.exp"' is not necessary here. We can simply return -1 or 0.


+set testfile "mi-catch-load"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}

Use "standard_testfile"


--
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]