diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-01-11 18:58:10 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-01-12 22:38:30 +0000 |
commit | cbcdb1aaddb4dd1a388eadbea6b6ec342c7ab067 (patch) | |
tree | 578de38e2fba7a73a91e726f478b7fd8df60b17c /gdb/testsuite | |
parent | ba643918cf869fa0d064d733f69b453b6fe642ea (diff) | |
download | fsf-binutils-gdb-cbcdb1aaddb4dd1a388eadbea6b6ec342c7ab067.zip fsf-binutils-gdb-cbcdb1aaddb4dd1a388eadbea6b6ec342c7ab067.tar.gz fsf-binutils-gdb-cbcdb1aaddb4dd1a388eadbea6b6ec342c7ab067.tar.bz2 |
gdb/testsuite: Don't attempt tests if they fail to compile
In the gdb.base/whatis-ptype-typedefs.exp test, if the test program
fails to compile, don't run the tests.
gdb/testsuite/ChangeLog:
* gdb.base/whatis-ptype-typedefs.exp: Don't run tests if we failed
to prepare.
(prepare): Return 0 on error, 1 on success.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index df4ecb8..f01546b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-01-12 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.base/whatis-ptype-typedefs.exp: Don't run tests if we failed + to prepare. + (prepare): Return 0 on error, 1 on success. + 2018-01-12 Pedro Alves <palves@redhat.com> * gdb.base/continue-after-aborted-step-over.c: New. diff --git a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp index 763d2a4..3d910df 100644 --- a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp +++ b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp @@ -45,13 +45,15 @@ proc prepare {lang} { if { [prepare_for_testing "failed to prepare" \ ${out} [list $srcfile] $options] } { - return -1 + return 0 } if ![runto_main] then { fail "can't run to main" return 0 } + + return 1 } # The following list is layed out as a table. It is composed by @@ -300,6 +302,7 @@ proc run_tests {lang} { } foreach_with_prefix lang {"c" "c++"} { - prepare $lang - run_tests $lang + if { [prepare $lang] } then { + run_tests $lang + } } |