From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119888 invoked by alias); 18 Jan 2016 22:49:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 119874 invoked by uid 89); 18 Jan 2016 22:48:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=251, surprises, 2.5.1, appearing X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 18 Jan 2016 22:48:58 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 6E.E3.06940.2796D965; Mon, 18 Jan 2016 23:38:43 +0100 (CET) Received: from elxcz23q12-y4.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.87) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 18 Jan 2016 17:48:56 -0500 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] testsuite: Make check-parallel return non-zero if a test failed Date: Mon, 18 Jan 2016 22:49:00 -0000 Message-ID: <1453157331-5472-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00405.txt.bz2 When using the check-parallel target, the return code of make is always 0, regardless of test results. This patch makes it return the same code as the "make do-check-parallel" sub-command. So if there is a FAIL somewhere, non-zero will be returned by make. For the sake of example, I introduced a failure in gdb.base/break.exp. $ make check-single TESTS="gdb.base/break.exp gdb.python/py-value.exp" && echo 'Success :D' || echo 'Fail :(' ... FAIL: gdb.base/break.exp: allo ... Fail :( I think the parallel run should do the same. Currently: $ make check-parallel TESTS="gdb.base/break.exp gdb.python/py-value.exp" && echo 'Success :D' || echo 'Fail :(' ... FAIL: gdb.base/break.exp: allo ... Success :D And with the patch (no big surprises there): $ make check-parallel TESTS="gdb.base/break.exp gdb.python/py-value.exp" && echo 'Success :D' || echo 'Fail :(' ... FAIL: gdb.base/break.exp: allo ... Fail :( What do you think? gdb/testsuite/ChangeLog: * Makefile.in (check-parallel): Propagate return code from make do-check-parallel. --- gdb/testsuite/Makefile.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index ae7fa7b..50edf8a 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -198,11 +198,13 @@ check-single: check-parallel: -rm -rf cache outputs temp $(MAKE) -k do-check-parallel; \ + result=$$?; \ $(SHELL) $(srcdir)/dg-extract-results.sh \ `find outputs -name gdb.sum -print` > gdb.sum; \ $(SHELL) $(srcdir)/dg-extract-results.sh -L \ - `find outputs -name gdb.log -print` > gdb.log - @sed -n '/=== gdb Summary ===/,$$ p' gdb.sum + `find outputs -name gdb.log -print` > gdb.log; \ + sed -n '/=== gdb Summary ===/,$$ p' gdb.sum; \ + exit $$result # Turn a list of .exp files into "check/" targets. Only examine .exp # files appearing in a gdb.* directory -- we don't want to pick up -- 2.5.1