This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite: Add --status to runtest invocation
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Tue, 19 Jan 2016 11:24:41 +0000
- Subject: Re: [PATCH] testsuite: Add --status to runtest invocation
- Authentication-results: sourceware.org; auth=none
- References: <1453157560-7080-1-git-send-email-simon dot marchi at ericsson dot com>
On 01/18/2016 10:52 PM, Simon Marchi wrote:
> As discussed in this thread:
>
> https://sourceware.org/ml/gdb-patches/2016-01/msg00243.html
>
> By default, if a test driver (a test .exp) ends with an uncaught
> error/exception, the runtest command will still have a return code of 0
> (success). I think that if a test (or the environment) is broken and
> the test ends up with an exception, it should be considered as failed so
> that we can notice it and fix it.
>
> Passing the --status flag to runtest will make it return an error if one
> of the test it runs ends up with an uncaught error.
>
> gdb/testsuite/ChangeLog:
>
> * Makefile.in (check-single): Pass --status to runtest.
> (check/%.exp): Likewise.
Hmm, the perf bits of the runtest invocation already pass --status:
@GMAKE_TRUE@ $(DO_RUNTEST) --status --outdir=gdb.perf/outputs/$* lib/build-piece.exp WORKER=$* GDB_PARALLEL=gdb.perf $(RUNTESTFLAGS) GDB_PERFTEST_MODE=compile GDB_PERFTEST_SUBMODE=build-pieces
...
@GMAKE_TRUE@ $(DO_RUNTEST) --status --directory=gdb.perf --outdir gdb.perf/workers GDB_PARALLEL=gdb.perf $(RUNTESTFLAGS) GDB_PERFTEST_MODE=compile GDB_PERFTEST_SUBMODE=gen-workers
...
@GMAKE_TRUE@ $(DO_RUNTEST) --status --directory=gdb.perf --outdir gdb.perf GDB_PARALLEL=gdb.perf $(RUNTESTFLAGS) GDB_PERFTEST_MODE=compile GDB_PERFTEST_SUBMODE=final
But there's one that doesn't:
check-perf: all $(abs_builddir)/site.exp
@if test ! -d gdb.perf; then mkdir gdb.perf; fi
$(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf GDB_PERFTEST_MODE=$(GDB_PERFTEST_MODE) $(RUNTESTFLAGS)
Seems like an oversight?
How about adding --status to DO_RUNTEST directly instead, so
that all invocations are always covered?
Thanks,
Pedro Alves