public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: Pedro Alves <palves@redhat.com>,
	dejagnu@gnu.org,	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: How to abort a test?
Date: Sun, 17 Jan 2016 08:27:00 -0000	[thread overview]
Message-ID: <20160117082709.GC4059@adacore.com> (raw)
In-Reply-To: <56991FB0.5090109@ericsson.com>

Hi Simon,

> I feel completely stupid now.  Just under the line I pasted in my
> original message, there is this comment:
> 
> 1474         if { [catch "uplevel #0 source $test_file_name"] == 1 } {
> 1475             # If we have a Tcl error, propogate the exit status do make
> 1476             # notices the error.
> 1477             global exit_status exit_error
> 1478             # exit error is set by a command line option
> 1479             if { $exit_status == 0 } {
> 1480                 set exit_status $exit_error
> 1481             }
> 
> After searching where this goes, I saw the --status argument to runtest:
> 
>        --status
>               Set the exit status to fail on Tcl errors.
> 
> Turns out we just need to add this to our runtest invocation to make
> it return non-zero when a test driver, as it calls the test .exp's,
> fails.  So we just need to add this to our call to runtest (will send
> a patch later).  Sometimes it can be worth it to read the man page
> first...

I admit that some of it flying a little over my head... Does it
mean that we will be able to abort a test if we detect a timeout?
This is one of the things I wanted to do, but didn't have a solution
for, so it'd be fantastic if it helped with that!

-- 
Joel

  parent reply	other threads:[~2016-01-17  8:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 22:51 Simon Marchi
2016-01-14 16:25 ` Pedro Alves
2016-01-14 17:13   ` Simon Marchi
2016-01-14 17:28     ` Pedro Alves
2016-01-14 19:43       ` Simon Marchi
2016-01-14 19:48         ` Pedro Alves
2016-01-15 16:35           ` Simon Marchi
2016-01-15 20:22             ` Ben Elliston
2016-01-17  8:27             ` Joel Brobecker [this message]
2016-01-18 16:43               ` Simon Marchi
2016-01-21 10:42                 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160117082709.GC4059@adacore.com \
    --to=brobecker@adacore.com \
    --cc=dejagnu@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).