From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65107 invoked by alias); 11 Jan 2018 19:01:02 -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 65052 invoked by uid 89); 11 Jan 2018 19:01:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr0-f194.google.com Received: from mail-wr0-f194.google.com (HELO mail-wr0-f194.google.com) (209.85.128.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jan 2018 19:01:00 +0000 Received: by mail-wr0-f194.google.com with SMTP id 100so3171325wrb.7 for ; Thu, 11 Jan 2018 11:01:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PoGOz20RJjbIZJCQPZ4zgb4oRWHmbX/+OeXhygA9OvA=; b=X9aRt+Bglfl/PCWZ3axzSIjxm2nFomw968byeYhrk27gHfsHffYA3WKEGU6zB3693S Rszp227BH0TjrxDS4qckbq0fwJ5i7fvjE6rqmmkslh7k+oHcde+MFNwKS6oI4bDsqUAQ X8Q8AoMmrgY06oj3lpPWrbv/rn3mU+3eLleGof2YucxtnoU/jj1H2njXKar5MZHBxGxL xCR1zJIQc24HR2Zsi/M43M/PapsAK/vl6bw/t3Z/A3+EDU1WojKZcLYRIrBuDjqSj1o+ emQUCZqyII54oSjKeqBoLZQ+MTviJf2Gy4fu+TS7/HVsI8WO3dFeJR3aJ5KLB2kMGW+6 KRSg== X-Gm-Message-State: AKwxytdo9Gm1jsgE4vn6rCwzZmZR7FWYwL2vSbjfbAsYmanSO8PWtavP eqJfraDt4SDd9tN9lToUd1Ahg+ah X-Google-Smtp-Source: ACJfBotUVvcF57Sj0HfHd7k3ZuQ1UHujqOj+ASKtS94SBmp2mdVgOuefAbPtjqR2ttSLlvN1BN5jsg== X-Received: by 10.223.154.77 with SMTP id z71mr3048189wrb.282.1515697258229; Thu, 11 Jan 2018 11:00:58 -0800 (PST) Received: from localhost ([81.141.199.69]) by smtp.gmail.com with ESMTPSA id s45sm32362945wrc.89.2018.01.11.11.00.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 11:00:57 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] gdb/testsuite: Don't attempt tests if they fail to compile Date: Thu, 11 Jan 2018 19:01:00 -0000 Message-Id: <20180111190055.4875-1-andrew.burgess@embecosm.com> X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00218.txt.bz2 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. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp index 763d2a43952..3d910df5d02 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 + } } -- 2.12.2