* [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp
@ 2008-10-15 11:22 Denis PILAT
2008-10-15 11:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Denis PILAT @ 2008-10-15 11:22 UTC (permalink / raw)
To: gdb-patches
Is there any reason why we do not test -inferior-tty commands on
gdb.mi/mi2-basics.exp ?
If no I propose to activate these tests, like in mi-basics.exp.
I'll take this opportunity to fix a typo on my previous commit where I wrote
gdb.mi/mb-ctor.exp in the place of gdb.cp/mb-ctor.exp. (that was to fix
a typo ;)
--
Denis
2008-10-15 Denis Pilat <denis.pilat@st.com>
* gdb.mi/mi2-basics.exp: Activate -inferior-tty tests like
in mi2-basics.exp.
(test_setshow_inferior_tty): new function.
Index: gdb.mi/mi2-basics.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-basics.exp,v
retrieving revision 1.12
diff -u -p -r1.12 mi2-basics.exp
--- gdb.mi/mi2-basics.exp 6 Aug 2008 12:52:08 -0000 1.12
+++ gdb.mi/mi2-basics.exp 15 Oct 2008 11:11:49 -0000
@@ -30,7 +30,7 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi2"
gdb_exit
-if [mi_gdb_start] {
+if [mi_gdb_start separate-inferior-tty] {
continue
}
@@ -174,8 +174,8 @@ proc test_dir_specification {} {
proc test_cwd_specification {} {
global mi_gdb_prompt
global objdir
- global subdir
global escapedobjdir
+ global subdir
# Change the working directory, then print the current working directory
# Tests:
@@ -238,12 +238,51 @@ proc test_path_specification {} {
}
+proc test_setshow_inferior_tty {} {
+ global mi_gdb_prompt
+ global mi_inferior_tty_name
+
+ # Test that the commands,
+ # -inferior-tty-set
+ # -inferior-tty-show
+ # are setting/getting the same data in GDB.
+
+ mi_gdb_test "301-inferior-tty-show" \
+ "301\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \
+ "initial tty is mi_inferior_tty_name"
+
+ mi_gdb_test "302-inferior-tty-set /dev/pts/1" \
+ "302\\\^done" \
+ "set tty to /dev/pts/1"
+
+ mi_gdb_test "303-inferior-tty-show" \
+ "303\\\^done,inferior_tty_terminal=\"/dev/pts/1\"" \
+ "tty was set correctly"
+
+ mi_gdb_test "304-inferior-tty-set" \
+ "304\\\^done" \
+ "set tty to the empty string"
+
+ mi_gdb_test "305-inferior-tty-show" \
+ "305\\\^done" \
+ "make sure tty is empty"
+
+ mi_gdb_test "306-inferior-tty-set $mi_inferior_tty_name" \
+ "306\\\^done" \
+ "set tty to mi_inferior_tty_name (the way it was)"
+
+ mi_gdb_test "307-inferior-tty-show" \
+ "307\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \
+ "verify tty is correct"
+}
+
if [test_mi_interpreter_selection] {
test_exec_and_symbol_mi_operatons
test_breakpoints_deletion
test_dir_specification
test_cwd_specification
test_path_specification
+ test_setshow_inferior_tty
}
mi_gdb_exit
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp
2008-10-15 11:22 [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp Denis PILAT
@ 2008-10-15 11:57 ` Daniel Jacobowitz
2008-10-15 13:07 ` Denis PILAT
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2008-10-15 11:57 UTC (permalink / raw)
To: Denis PILAT; +Cc: gdb-patches
On Wed, Oct 15, 2008 at 01:21:43PM +0200, Denis PILAT wrote:
> Is there any reason why we do not test -inferior-tty commands on
> gdb.mi/mi2-basics.exp ?
> If no I propose to activate these tests, like in mi-basics.exp.
IIRC, it was because -inferior-tty was added after mi2.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp
2008-10-15 11:57 ` Daniel Jacobowitz
@ 2008-10-15 13:07 ` Denis PILAT
0 siblings, 0 replies; 3+ messages in thread
From: Denis PILAT @ 2008-10-15 13:07 UTC (permalink / raw)
To: Denis PILAT, gdb-patches
Daniel Jacobowitz wrote:
> On Wed, Oct 15, 2008 at 01:21:43PM +0200, Denis PILAT wrote:
>
>> Is there any reason why we do not test -inferior-tty commands on
>> gdb.mi/mi2-basics.exp ?
>> If no I propose to activate these tests, like in mi-basics.exp.
>>
>
> IIRC, it was because -inferior-tty was added after mi2.
>
Ok I just commit my typo and leave the mi2-basics.exp as is.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-15 13:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-15 11:22 [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp Denis PILAT
2008-10-15 11:57 ` Daniel Jacobowitz
2008-10-15 13:07 ` Denis PILAT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox