[gdb/testsuite] Capture many-headers.exp progress and output in gdb.log
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / async-shell.exp
CommitLineData
b811d2c2 1# Copyright (C) 2011-2020 Free Software Foundation, Inc.
5be4dfca
JK
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
a64d2530 16standard_testfile
d5b4a7be
YQ
17
18if { ![support_displaced_stepping] } {
19 unsupported "displaced stepping"
20 return -1
21}
22
3a3dad98 23# The testfile uses "run". The real bug happened only for ![is_remote target].
079670b9 24if [use_gdb_stub] {
3a3dad98
JK
25 return 0
26}
27
5b362f04 28if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
5be4dfca
JK
29 return -1
30}
31
e7de8362 32set gdbindex_warning_re "warning: Skipping \[^\r\n\]+ \\.gdb_index section \[^\r\n\]*\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\."
481860b3 33
5be4dfca 34gdb_test_no_output "set non-stop on"
481860b3 35gdb_test "run &" "Starting program: \[^\r\n\]*(\r\n$gdbindex_warning_re)?"
5be4dfca
JK
36
37# `sleep 5' here would workaround the bug, do not sleep here.
38# "shell" could eat waitpid event from the asynchronous inferior process.
39
40gdb_test "shell echo foo" "foo"
41
42set test "interrupt"
43gdb_test_multiple $test $test {
44 -re "interrupt\r\n$gdb_prompt " {
45 pass $test
46 }
47}
48
49set test "process stopped"
50gdb_test_multiple "" $test {
f303dbd6 51 -re "Program stopped\\\.\r\n" {
5be4dfca
JK
52 pass $test
53 }
54}
This page took 0.9748 seconds and 4 git commands to generate.