From patchwork Thu Jan 12 02:59:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63011 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D74D33881D1E for ; Thu, 12 Jan 2023 03:03:07 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy1-pub.mail.unifiedlayer.com (gproxy1-pub.mail.unifiedlayer.com [69.89.25.95]) by sourceware.org (Postfix) with ESMTPS id C0D73385828D for ; Thu, 12 Jan 2023 03:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C0D73385828D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id 38A6810047A9F for ; Thu, 12 Jan 2023 03:01:09 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id Fnq1pqUnwB18UFnq1pA3ad; Thu, 12 Jan 2023 03:01:09 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Ns4Uz+RJ c=1 sm=1 tr=0 ts=63bf77f5 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=RvmDmJFTN0MA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=TkTTPzHaAAAA:8 a=20KFwNOVAAAA:8 a=IoYy24V1dLSQ6XBgzbQA:9 a=_FVE-zBwftR9WsbkzFJk:22 a=Qz3p68GZ3z-NqTySStDO:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2Li1BNGXlPbk/B72ehQ5ezd1FkvIqx6AtiIWvFXPIKM=; b=pPhHup/7GO1YM/WC3H1bxut5OM WADEE413Sky979VMnkfIQXK1uYjasM5muCSpXPAGnnk7bHiD0lXeKjw4gSW1TfNFdTixdt8XnSUmL Q9wZJYZ/o2YGqnj9TcmyyHnXD; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:53100 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pFnq0-000lEr-Ou; Wed, 11 Jan 2023 20:01:08 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 08/79] Use require skip_cplus_tests Date: Wed, 11 Jan 2023 19:59:41 -0700 Message-Id: <20230112030052.3306113-9-tom@tromey.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112030052.3306113-1-tom@tromey.com> References: <20230112030052.3306113-1-tom@tromey.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.76.186 X-Source-L: No X-Exim-ID: 1pFnq0-000lEr-Ou X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:53100 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This changes some tests to use "require skip_cplus_tests". --- gdb/testsuite/gdb.base/advance-until-multiple-locations.exp | 2 +- gdb/testsuite/gdb.base/align-c++.exp | 4 +--- gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp | 2 +- gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp | 4 +--- gdb/testsuite/gdb.base/info-types-c++.exp | 4 +--- gdb/testsuite/gdb.base/max-depth-c++.exp | 4 +--- gdb/testsuite/gdb.base/prologue.exp | 2 +- gdb/testsuite/gdb.base/psymtab.exp | 2 +- gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-inherit.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-member.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-method.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-namespace.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-nested.exp | 5 +---- gdb/testsuite/gdb.compile/compile-cplus-virtual.exp | 5 +---- gdb/testsuite/gdb.cp/align.exp | 2 +- gdb/testsuite/gdb.cp/ambiguous.exp | 2 +- gdb/testsuite/gdb.cp/annota2.exp | 2 +- gdb/testsuite/gdb.cp/annota3.exp | 2 +- gdb/testsuite/gdb.cp/anon-ns.exp | 2 +- gdb/testsuite/gdb.cp/anon-union.exp | 2 +- gdb/testsuite/gdb.cp/arg-reference.exp | 2 +- gdb/testsuite/gdb.cp/array-indices.exp | 2 +- gdb/testsuite/gdb.cp/array-repeat.exp | 2 +- gdb/testsuite/gdb.cp/bool.exp | 2 +- gdb/testsuite/gdb.cp/break-f-std-string.exp | 2 +- gdb/testsuite/gdb.cp/breakpoint-locs.exp | 2 +- gdb/testsuite/gdb.cp/breakpoint.exp | 2 +- gdb/testsuite/gdb.cp/call-c.exp | 2 +- gdb/testsuite/gdb.cp/call-method-register.exp | 2 +- gdb/testsuite/gdb.cp/casts.exp | 2 +- gdb/testsuite/gdb.cp/chained-calls.exp | 2 +- gdb/testsuite/gdb.cp/class2.exp | 2 +- gdb/testsuite/gdb.cp/classes.exp | 2 +- gdb/testsuite/gdb.cp/cmpd-minsyms.exp | 2 +- gdb/testsuite/gdb.cp/constexpr-field.exp | 2 +- gdb/testsuite/gdb.cp/cp-relocate.exp | 2 +- gdb/testsuite/gdb.cp/cpcompletion.exp | 2 +- gdb/testsuite/gdb.cp/cplabel.exp | 2 +- gdb/testsuite/gdb.cp/cplusfuncs.exp | 2 +- gdb/testsuite/gdb.cp/cpsizeof.exp | 2 +- gdb/testsuite/gdb.cp/ctti.exp | 2 +- gdb/testsuite/gdb.cp/debug-expr.exp | 2 +- gdb/testsuite/gdb.cp/demangle.exp | 2 +- gdb/testsuite/gdb.cp/derivation.exp | 2 +- gdb/testsuite/gdb.cp/disasm-func-name.exp | 2 +- gdb/testsuite/gdb.cp/dispcxx.exp | 2 +- gdb/testsuite/gdb.cp/ena-dis-br-range.exp | 2 +- gdb/testsuite/gdb.cp/enum-class.exp | 2 +- gdb/testsuite/gdb.cp/exceptprint.exp | 4 +--- gdb/testsuite/gdb.cp/expand-sals.exp | 2 +- gdb/testsuite/gdb.cp/extern-c.exp | 2 +- gdb/testsuite/gdb.cp/filename.exp | 2 +- gdb/testsuite/gdb.cp/formatted-ref.exp | 2 +- gdb/testsuite/gdb.cp/gdb1355.exp | 2 +- gdb/testsuite/gdb.cp/gdb2384.exp | 3 +-- gdb/testsuite/gdb.cp/gdb2495.exp | 2 +- gdb/testsuite/gdb.cp/hang.exp | 2 +- gdb/testsuite/gdb.cp/impl-this.exp | 2 +- gdb/testsuite/gdb.cp/incomplete-type-overload.exp | 4 +--- gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp | 4 +--- gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp | 4 +--- gdb/testsuite/gdb.cp/inherit.exp | 2 +- gdb/testsuite/gdb.cp/iostream.exp | 2 +- gdb/testsuite/gdb.cp/local.exp | 2 +- gdb/testsuite/gdb.cp/m-data.exp | 2 +- gdb/testsuite/gdb.cp/m-static.exp | 2 +- gdb/testsuite/gdb.cp/many-args.exp | 2 +- gdb/testsuite/gdb.cp/mb-ctor.exp | 2 +- gdb/testsuite/gdb.cp/mb-inline.exp | 2 +- gdb/testsuite/gdb.cp/member-name.exp | 2 +- gdb/testsuite/gdb.cp/member-ptr.exp | 2 +- gdb/testsuite/gdb.cp/meth-typedefs.exp | 2 +- gdb/testsuite/gdb.cp/method.exp | 2 +- gdb/testsuite/gdb.cp/method2.exp | 2 +- gdb/testsuite/gdb.cp/misc.exp | 2 +- gdb/testsuite/gdb.cp/namelessclass.exp | 6 +----- gdb/testsuite/gdb.cp/namespace.exp | 2 +- gdb/testsuite/gdb.cp/nested-class-func-class.exp | 2 +- gdb/testsuite/gdb.cp/nested-types.exp | 2 +- gdb/testsuite/gdb.cp/nextoverthrow.exp | 2 +- gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp | 4 +--- gdb/testsuite/gdb.cp/non-trivial-retval.exp | 2 +- gdb/testsuite/gdb.cp/nsalias.exp | 6 +----- gdb/testsuite/gdb.cp/overload-const.exp | 2 +- gdb/testsuite/gdb.cp/overload.exp | 2 +- gdb/testsuite/gdb.cp/ovldbreak.exp | 2 +- gdb/testsuite/gdb.cp/ovsrch.exp | 2 +- gdb/testsuite/gdb.cp/pass-by-ref-2.exp | 5 +---- gdb/testsuite/gdb.cp/pass-by-ref.exp | 5 +---- gdb/testsuite/gdb.cp/pointer-to-member.exp | 2 +- gdb/testsuite/gdb.cp/pr-1023.exp | 2 +- gdb/testsuite/gdb.cp/pr-1210.exp | 2 +- gdb/testsuite/gdb.cp/pr-574.exp | 2 +- gdb/testsuite/gdb.cp/pr10728.exp | 2 +- gdb/testsuite/gdb.cp/pr17132.exp | 2 +- gdb/testsuite/gdb.cp/pr17494.exp | 2 +- gdb/testsuite/gdb.cp/pr9067.exp | 2 +- gdb/testsuite/gdb.cp/pr9631.exp | 2 +- gdb/testsuite/gdb.cp/print-demangle.exp | 2 +- gdb/testsuite/gdb.cp/print-method-args.exp | 2 +- gdb/testsuite/gdb.cp/printmethod.exp | 2 +- gdb/testsuite/gdb.cp/psmang.exp | 2 +- gdb/testsuite/gdb.cp/psymtab-parameter.exp | 2 +- gdb/testsuite/gdb.cp/ptype-cv-cp.exp | 2 +- gdb/testsuite/gdb.cp/ptype-flags.exp | 2 +- gdb/testsuite/gdb.cp/punctuator.exp | 2 +- gdb/testsuite/gdb.cp/re-set-overloaded.exp | 3 +-- gdb/testsuite/gdb.cp/ref-params.exp | 2 +- gdb/testsuite/gdb.cp/ref-types.exp | 2 +- gdb/testsuite/gdb.cp/rtti.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-casts.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-overload.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-params.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-types.exp | 2 +- gdb/testsuite/gdb.cp/scope-err.exp | 4 +--- gdb/testsuite/gdb.cp/static-method.exp | 2 +- gdb/testsuite/gdb.cp/static-print-quit.exp | 2 +- gdb/testsuite/gdb.cp/static-typedef-print.exp | 2 +- gdb/testsuite/gdb.cp/stub-array-size.exp | 2 +- gdb/testsuite/gdb.cp/subtypes.exp | 2 +- gdb/testsuite/gdb.cp/temargs.exp | 4 +--- gdb/testsuite/gdb.cp/templates.exp | 2 +- gdb/testsuite/gdb.cp/typed-enum.exp | 2 +- gdb/testsuite/gdb.cp/typedef-base.exp | 2 +- gdb/testsuite/gdb.cp/typedef-operator.exp | 2 +- gdb/testsuite/gdb.cp/typeid.exp | 4 +--- gdb/testsuite/gdb.cp/var-tag.exp | 2 +- gdb/testsuite/gdb.cp/virtbase.exp | 2 +- gdb/testsuite/gdb.cp/virtbase2.exp | 2 +- gdb/testsuite/gdb.cp/virtfunc.exp | 2 +- gdb/testsuite/gdb.cp/virtfunc2.exp | 2 +- gdb/testsuite/gdb.cp/watch-cp.exp | 2 +- gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp | 2 +- gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp | 2 +- gdb/testsuite/gdb.dwarf2/implptrconst.exp | 2 +- gdb/testsuite/gdb.dwarf2/implptrpiece.exp | 2 +- gdb/testsuite/gdb.dwarf2/implref-array.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-const.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-global.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-struct.exp | 4 +--- gdb/testsuite/gdb.dwarf2/imported-unit.exp | 4 +--- gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp | 2 +- gdb/testsuite/gdb.dwarf2/method-ptr.exp | 2 +- gdb/testsuite/gdb.dwarf2/missing-sig-type.exp | 2 +- gdb/testsuite/gdb.dwarf2/nostaticblock.exp | 2 +- gdb/testsuite/gdb.dwarf2/nullptr_t.exp | 2 +- gdb/testsuite/gdb.dwarf2/staticvirtual.exp | 2 +- gdb/testsuite/gdb.dwarf2/subrange.exp | 2 +- gdb/testsuite/gdb.guile/scm-value-cc.exp | 2 +- gdb/testsuite/gdb.linespec/break-ask.exp | 5 +---- gdb/testsuite/gdb.linespec/cpexplicit.exp | 5 +---- gdb/testsuite/gdb.linespec/linespec.exp | 5 +---- gdb/testsuite/gdb.linespec/ls-dollar.exp | 5 +---- gdb/testsuite/gdb.linespec/skip-two.exp | 5 +---- gdb/testsuite/gdb.mi/gdb792.exp | 2 +- gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp | 2 +- gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp | 2 +- gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp | 4 +--- gdb/testsuite/gdb.mi/mi-var-cp.exp | 2 +- gdb/testsuite/gdb.mi/mi-var-rtti.exp | 2 +- gdb/testsuite/gdb.python/py-explore-cc.exp | 2 +- gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp | 2 +- gdb/testsuite/gdb.python/py-template.exp | 2 +- gdb/testsuite/gdb.python/py-typeprint.exp | 2 +- gdb/testsuite/gdb.python/py-value-cc.exp | 2 +- gdb/testsuite/gdb.python/py-xmethods.exp | 5 +---- 171 files changed, 171 insertions(+), 265 deletions(-) diff --git a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp index 181ab334be5..ef60fc67951 100644 --- a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp +++ b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp @@ -18,7 +18,7 @@ standard_testfile .cc -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ {debug c++}] } { diff --git a/gdb/testsuite/gdb.base/align-c++.exp b/gdb/testsuite/gdb.base/align-c++.exp index c017501bde9..cb9504ab546 100644 --- a/gdb/testsuite/gdb.base/align-c++.exp +++ b/gdb/testsuite/gdb.base/align-c++.exp @@ -19,9 +19,7 @@ # compiler. # Only test C++ if we are able. -if { [skip_cplus_tests] } { - return -1 -} +require !skip_cplus_tests set lang c++ source $srcdir/$subdir/align.exp.tcl diff --git a/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp b/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp index 0a902c86637..a4d168db0fa 100644 --- a/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp +++ b/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp @@ -23,7 +23,7 @@ # # test running programs # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp b/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp index 6d7f373a0d3..9b0be13f3f7 100644 --- a/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp +++ b/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp @@ -16,9 +16,7 @@ # along with this program. If not, see . # Only test C++ if we are able. -if { [skip_cplus_tests] } { - return -1 -} +require !skip_cplus_tests set lang c++ source $srcdir/$subdir/infcall-nested-structs.exp.tcl diff --git a/gdb/testsuite/gdb.base/info-types-c++.exp b/gdb/testsuite/gdb.base/info-types-c++.exp index a6bc43e14d9..4b1049b3e59 100644 --- a/gdb/testsuite/gdb.base/info-types-c++.exp +++ b/gdb/testsuite/gdb.base/info-types-c++.exp @@ -14,9 +14,7 @@ # along with this program. If not, see . # Only test C++ if we are able. -if { [skip_cplus_tests] } { - return -1 -} +require !skip_cplus_tests set lang c++ source $srcdir/$subdir/info-types.exp.tcl diff --git a/gdb/testsuite/gdb.base/max-depth-c++.exp b/gdb/testsuite/gdb.base/max-depth-c++.exp index 52c4a41c749..a959b81b639 100644 --- a/gdb/testsuite/gdb.base/max-depth-c++.exp +++ b/gdb/testsuite/gdb.base/max-depth-c++.exp @@ -14,9 +14,7 @@ # along with this program. If not, see . # Only test C++ if we are able. -if { [skip_cplus_tests] } { - return -1 -} +require !skip_cplus_tests set lang c++ source $srcdir/$subdir/max-depth.exp.tcl diff --git a/gdb/testsuite/gdb.base/prologue.exp b/gdb/testsuite/gdb.base/prologue.exp index e1872d4d499..adee2573cee 100644 --- a/gdb/testsuite/gdb.base/prologue.exp +++ b/gdb/testsuite/gdb.base/prologue.exp @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .c diff --git a/gdb/testsuite/gdb.base/psymtab.exp b/gdb/testsuite/gdb.base/psymtab.exp index 27ab21c4428..99f233ffb6b 100644 --- a/gdb/testsuite/gdb.base/psymtab.exp +++ b/gdb/testsuite/gdb.base/psymtab.exp @@ -24,7 +24,7 @@ # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile psymtab1.c psymtab2.c diff --git a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp index 85c123c4965..912deabd9b7 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp index 48ed04ecaca..a1baccdbc5b 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++ additional_flags=-std=c++11}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp index 605dfb68022..78501c6a5f4 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-member.exp b/gdb/testsuite/gdb.compile/compile-cplus-member.exp index dbc92e235d7..356d39f5008 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-member.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-member.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-method.exp b/gdb/testsuite/gdb.compile/compile-cplus-method.exp index c23ac26db45..8261a14ac8f 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-method.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-method.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp index c99b2e4fdc3..ffc13332809 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp index def6596d45b..c827dcebe54 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp index 4ea80d961b3..33fec029257 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp @@ -19,10 +19,7 @@ load_lib compile-support.exp standard_testfile .cc -if {[skip_cplus_tests]} { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing $testfile $testfile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.cp/align.exp b/gdb/testsuite/gdb.cp/align.exp index f1c8f5fd19d..b75024dec6b 100644 --- a/gdb/testsuite/gdb.cp/align.exp +++ b/gdb/testsuite/gdb.cp/align.exp @@ -18,7 +18,7 @@ # This tests that C++ alignof works in gdb, and that it agrees with # the compiler. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests # The types we're going to test. diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp index 966d99ae595..e132e73d80b 100644 --- a/gdb/testsuite/gdb.cp/ambiguous.exp +++ b/gdb/testsuite/gdb.cp/ambiguous.exp @@ -19,7 +19,7 @@ # about the field or baseclass being ambiguous is emitted at the right # times. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 51cf92ae1a1..160d26903d8 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -20,7 +20,7 @@ # test running programs # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp index b728c4e4708..5a5f3ff38a4 100644 --- a/gdb/testsuite/gdb.cp/annota3.exp +++ b/gdb/testsuite/gdb.cp/annota3.exp @@ -20,7 +20,7 @@ # test running programs # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/anon-ns.exp b/gdb/testsuite/gdb.cp/anon-ns.exp index a0d1245d3f4..d9017533a44 100644 --- a/gdb/testsuite/gdb.cp/anon-ns.exp +++ b/gdb/testsuite/gdb.cp/anon-ns.exp @@ -17,7 +17,7 @@ # This file is part of the gdb testsuite. -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests standard_testfile .cc anon-ns2.cc diff --git a/gdb/testsuite/gdb.cp/anon-union.exp b/gdb/testsuite/gdb.cp/anon-union.exp index 521ee4e187c..f5ec03d49ec 100644 --- a/gdb/testsuite/gdb.cp/anon-union.exp +++ b/gdb/testsuite/gdb.cp/anon-union.exp @@ -23,7 +23,7 @@ # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/arg-reference.exp b/gdb/testsuite/gdb.cp/arg-reference.exp index c72196ef086..21a89bde85f 100644 --- a/gdb/testsuite/gdb.cp/arg-reference.exp +++ b/gdb/testsuite/gdb.cp/arg-reference.exp @@ -21,7 +21,7 @@ # Test G++ has compiled debuginfo without a C++ '&' reference where it should # not be. GCC Bug 33537. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/array-indices.exp b/gdb/testsuite/gdb.cp/array-indices.exp index e9723d953b6..8f88f947549 100644 --- a/gdb/testsuite/gdb.cp/array-indices.exp +++ b/gdb/testsuite/gdb.cp/array-indices.exp @@ -15,7 +15,7 @@ # Test the printing of element indices in C++ arrays. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests set lang c++ diff --git a/gdb/testsuite/gdb.cp/array-repeat.exp b/gdb/testsuite/gdb.cp/array-repeat.exp index dac0c68a4e9..8c71149c922 100644 --- a/gdb/testsuite/gdb.cp/array-repeat.exp +++ b/gdb/testsuite/gdb.cp/array-repeat.exp @@ -15,7 +15,7 @@ # Test the detection and printing of repeated elements in C++ arrays. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests set lang c++ diff --git a/gdb/testsuite/gdb.cp/bool.exp b/gdb/testsuite/gdb.cp/bool.exp index 350c6549855..27f35322035 100644 --- a/gdb/testsuite/gdb.cp/bool.exp +++ b/gdb/testsuite/gdb.cp/bool.exp @@ -20,7 +20,7 @@ # Test returning bool. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/break-f-std-string.exp b/gdb/testsuite/gdb.cp/break-f-std-string.exp index f687416dbf6..57006f059b8 100644 --- a/gdb/testsuite/gdb.cp/break-f-std-string.exp +++ b/gdb/testsuite/gdb.cp/break-f-std-string.exp @@ -58,7 +58,7 @@ standard_testfile .cc -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests # CXX11_ABI specifies the value to define _GLIBCXX_USE_CXX11_ABI as. diff --git a/gdb/testsuite/gdb.cp/breakpoint-locs.exp b/gdb/testsuite/gdb.cp/breakpoint-locs.exp index 18b03a0df7f..af1711ccbdb 100644 --- a/gdb/testsuite/gdb.cp/breakpoint-locs.exp +++ b/gdb/testsuite/gdb.cp/breakpoint-locs.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc breakpoint-locs-2.cc diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/breakpoint.exp index 2d1040d69c2..46762fc8b1c 100644 --- a/gdb/testsuite/gdb.cp/breakpoint.exp +++ b/gdb/testsuite/gdb.cp/breakpoint.exp @@ -17,7 +17,7 @@ # This contains tests for breakpoints in C++. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/call-c.exp b/gdb/testsuite/gdb.cp/call-c.exp index 15c136099cc..9fdbd00537e 100644 --- a/gdb/testsuite/gdb.cp/call-c.exp +++ b/gdb/testsuite/gdb.cp/call-c.exp @@ -14,7 +14,7 @@ # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc call-c-1.c set objfilec [standard_output_file ${testfile}-1.o] diff --git a/gdb/testsuite/gdb.cp/call-method-register.exp b/gdb/testsuite/gdb.cp/call-method-register.exp index 627403fc8e3..6f0f5214fe3 100644 --- a/gdb/testsuite/gdb.cp/call-method-register.exp +++ b/gdb/testsuite/gdb.cp/call-method-register.exp @@ -16,7 +16,7 @@ # Test callling a method on a variable that has been put in a # register. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib "cp-support.exp" load_lib dwarf.exp diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp index a13f662ba6b..35305d75ff1 100644 --- a/gdb/testsuite/gdb.cp/casts.exp +++ b/gdb/testsuite/gdb.cp/casts.exp @@ -25,7 +25,7 @@ # -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc casts03.cc diff --git a/gdb/testsuite/gdb.cp/chained-calls.exp b/gdb/testsuite/gdb.cp/chained-calls.exp index d131345dc6b..f147b365776 100644 --- a/gdb/testsuite/gdb.cp/chained-calls.exp +++ b/gdb/testsuite/gdb.cp/chained-calls.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp index 6270be47c13..ea7cdf16a04 100644 --- a/gdb/testsuite/gdb.cp/class2.exp +++ b/gdb/testsuite/gdb.cp/class2.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index d23c7d347ad..de7fa2eb14b 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -18,7 +18,7 @@ set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp index 6433ccb8cfe..70779cecfa4 100644 --- a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp +++ b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp @@ -17,7 +17,7 @@ # This file is part of the gdb testsuite. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests # Tests for c++/12273, breakpoint/12803 standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/constexpr-field.exp b/gdb/testsuite/gdb.cp/constexpr-field.exp index 14801d3bfb9..387636fd45c 100644 --- a/gdb/testsuite/gdb.cp/constexpr-field.exp +++ b/gdb/testsuite/gdb.cp/constexpr-field.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite. -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/cp-relocate.exp b/gdb/testsuite/gdb.cp/cp-relocate.exp index d46bf767d82..3846aa2aebc 100644 --- a/gdb/testsuite/gdb.cp/cp-relocate.exp +++ b/gdb/testsuite/gdb.cp/cp-relocate.exp @@ -18,7 +18,7 @@ standard_testfile .cc append binfile .o -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {c++ debug}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp index 931f376a23d..9d93d598430 100644 --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -51,7 +51,7 @@ proc test_class_complete {class expr name matches} { } } -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile pr9594.cc diff --git a/gdb/testsuite/gdb.cp/cplabel.exp b/gdb/testsuite/gdb.cp/cplabel.exp index 4c67cde8665..c29b47cdf4c 100644 --- a/gdb/testsuite/gdb.cp/cplabel.exp +++ b/gdb/testsuite/gdb.cp/cplabel.exp @@ -15,7 +15,7 @@ # Tests for breakpoint on labels in methods. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp index b3d798bbd67..f197e1148e7 100644 --- a/gdb/testsuite/gdb.cp/cplusfuncs.exp +++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp @@ -16,7 +16,7 @@ # This file was written by Fred Fish. (fnf@cygnus.com) # Adapted for g++ 3.0 ABI by Michael Chastain. (chastain@redhat.com) -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/cpsizeof.exp b/gdb/testsuite/gdb.cp/cpsizeof.exp index c452b57163c..d235528878b 100644 --- a/gdb/testsuite/gdb.cp/cpsizeof.exp +++ b/gdb/testsuite/gdb.cp/cpsizeof.exp @@ -16,7 +16,7 @@ standard_testfile .cc -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] } { return -1 diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp index 966c7490b57..a7cb9885258 100644 --- a/gdb/testsuite/gdb.cp/ctti.exp +++ b/gdb/testsuite/gdb.cp/ctti.exp @@ -21,7 +21,7 @@ # Call to template instantiations. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile cttiadd.cc cttiadd1.cc cttiadd2.cc cttiadd3.cc diff --git a/gdb/testsuite/gdb.cp/debug-expr.exp b/gdb/testsuite/gdb.cp/debug-expr.exp index a7938a42a14..300818e1d87 100644 --- a/gdb/testsuite/gdb.cp/debug-expr.exp +++ b/gdb/testsuite/gdb.cp/debug-expr.exp @@ -15,7 +15,7 @@ # Test "set debug expr 1" on c++ expressions. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests gdb_start gdb_test_no_output "set language c++" diff --git a/gdb/testsuite/gdb.cp/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp index 3093640cde0..28a0fe85ee1 100644 --- a/gdb/testsuite/gdb.cp/demangle.exp +++ b/gdb/testsuite/gdb.cp/demangle.exp @@ -15,7 +15,7 @@ # This file was written by Fred Fish. (fnf@cygnus.com) -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests ### The demangling style we last sent to GDB. set current_demangling_style none diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp index 2f7dd4c946d..bb482e69e9f 100644 --- a/gdb/testsuite/gdb.cp/derivation.exp +++ b/gdb/testsuite/gdb.cp/derivation.exp @@ -28,7 +28,7 @@ set nl "\[\r\n\]+" # Start program. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/disasm-func-name.exp b/gdb/testsuite/gdb.cp/disasm-func-name.exp index ba4296d27b2..3b8773fbf74 100644 --- a/gdb/testsuite/gdb.cp/disasm-func-name.exp +++ b/gdb/testsuite/gdb.cp/disasm-func-name.exp @@ -18,7 +18,7 @@ # Test that the disassembler correctly demangles C++ function names in # it's header line. -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/dispcxx.exp b/gdb/testsuite/gdb.cp/dispcxx.exp index 5ae2a223443..c079b0cd6a2 100644 --- a/gdb/testsuite/gdb.cp/dispcxx.exp +++ b/gdb/testsuite/gdb.cp/dispcxx.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp index 94f94e64a59..a8042c44b02 100644 --- a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp +++ b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp @@ -21,7 +21,7 @@ # multiple locations and breakpoints are found in # gdb.base/ena-dis-br.exp. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/enum-class.exp b/gdb/testsuite/gdb.cp/enum-class.exp index 67e8656616f..badc2dc2051 100644 --- a/gdb/testsuite/gdb.cp/enum-class.exp +++ b/gdb/testsuite/gdb.cp/enum-class.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/exceptprint.exp b/gdb/testsuite/gdb.cp/exceptprint.exp index 49fe02f9857..7e19d42561e 100644 --- a/gdb/testsuite/gdb.cp/exceptprint.exp +++ b/gdb/testsuite/gdb.cp/exceptprint.exp @@ -15,9 +15,7 @@ standard_testfile .cc -if {[skip_cplus_tests]} { - return -1 -} +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/expand-sals.exp b/gdb/testsuite/gdb.cp/expand-sals.exp index 0d74571e3b9..deb9c94cc8e 100644 --- a/gdb/testsuite/gdb.cp/expand-sals.exp +++ b/gdb/testsuite/gdb.cp/expand-sals.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests set srcfile expand-sals.cc if { [prepare_for_testing "failed to prepare" expand-sals $srcfile {debug c++}] } { diff --git a/gdb/testsuite/gdb.cp/extern-c.exp b/gdb/testsuite/gdb.cp/extern-c.exp index bdc869725d2..f380e90ace8 100644 --- a/gdb/testsuite/gdb.cp/extern-c.exp +++ b/gdb/testsuite/gdb.cp/extern-c.exp @@ -15,7 +15,7 @@ # Test breakpoints on extern "C" functions implemented in C++. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp index 54cf4d114b1..f34f162456f 100644 --- a/gdb/testsuite/gdb.cp/filename.exp +++ b/gdb/testsuite/gdb.cp/filename.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/formatted-ref.exp b/gdb/testsuite/gdb.cp/formatted-ref.exp index a9494d83f5e..07939637d68 100644 --- a/gdb/testsuite/gdb.cp/formatted-ref.exp +++ b/gdb/testsuite/gdb.cp/formatted-ref.exp @@ -28,7 +28,7 @@ # operand. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb1355.exp index 724a25180eb..1dda4c99ac9 100644 --- a/gdb/testsuite/gdb.cp/gdb1355.exp +++ b/gdb/testsuite/gdb.cp/gdb1355.exp @@ -21,7 +21,7 @@ set ws "\[\r\n\t \]*" set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp index 3e43d1d0366..6eb6292272b 100644 --- a/gdb/testsuite/gdb.cp/gdb2384.exp +++ b/gdb/testsuite/gdb.cp/gdb2384.exp @@ -21,8 +21,7 @@ # # PR c++/9489. -if { [skip_cplus_tests] } { continue } -if { [skip_shlib_tests] } { continue } +require !skip_cplus_tests !skip_shlib_tests standard_testfile .cc gdb2384-base.cc diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index 639cee32e23..5d9cedbde9f 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -31,7 +31,7 @@ # This test is largely based of gdb.base/callfuncs.exp. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests if [target_info exists gdb,nosignals] { verbose "Skipping gdb2495.exp because of nosignals." diff --git a/gdb/testsuite/gdb.cp/hang.exp b/gdb/testsuite/gdb.cp/hang.exp index e4ff996a285..95a0424d652 100644 --- a/gdb/testsuite/gdb.cp/hang.exp +++ b/gdb/testsuite/gdb.cp/hang.exp @@ -14,7 +14,7 @@ # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile hang1.cc hang2.cc hang3.cc diff --git a/gdb/testsuite/gdb.cp/impl-this.exp b/gdb/testsuite/gdb.cp/impl-this.exp index a37a8c6d104..14c3cb4b331 100644 --- a/gdb/testsuite/gdb.cp/impl-this.exp +++ b/gdb/testsuite/gdb.cp/impl-this.exp @@ -18,7 +18,7 @@ # Test expressions which assume an implicit "this" with a qualified # name. -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp index a2b60e5c3e1..5dfd671592c 100644 --- a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp +++ b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp @@ -20,9 +20,7 @@ load_lib dwarf.exp -if { [skip_cplus_tests] } { return } - -require dwarf2_support +require dwarf2_support !skip_cplus_tests standard_testfile .cc .S set asm_file [standard_output_file ${srcfile2}] diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp index c4636a79b77..6d1d3309768 100644 --- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp +++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp @@ -15,9 +15,7 @@ # along with this program. If not, see . # Only test C++ if we are able. Always use C. -if { [skip_cplus_tests] } { - return -1 -} +require !skip_cplus_tests set lang {c++} set debug nodebug diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp index 5313e95ef14..baf05594401 100644 --- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp +++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp @@ -15,9 +15,7 @@ # along with this program. If not, see . # Only test C++ if we are able. Always use C. -if { [skip_cplus_tests] } { - return -1 -} +require !skip_cplus_tests set lang {c++} set debug debug diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp index 55c96444606..1846125066e 100644 --- a/gdb/testsuite/gdb.cp/inherit.exp +++ b/gdb/testsuite/gdb.cp/inherit.exp @@ -20,7 +20,7 @@ set ws "\[\r\n\t \]+" set nl "\[\r\n\]+" set vhn "\\$\[0-9\]+" -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/iostream.exp b/gdb/testsuite/gdb.cp/iostream.exp index 38fd5832feb..afd54d116f9 100644 --- a/gdb/testsuite/gdb.cp/iostream.exp +++ b/gdb/testsuite/gdb.cp/iostream.exp @@ -16,7 +16,7 @@ # This file is part of the gdb testsuite. # It tests various aspects of iostream that have caused problems for gdb. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp index 11801544a33..a281019bb3d 100644 --- a/gdb/testsuite/gdb.cp/local.exp +++ b/gdb/testsuite/gdb.cp/local.exp @@ -27,7 +27,7 @@ set nl "\[\r\n\]+" # test running programs # -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/m-data.exp b/gdb/testsuite/gdb.cp/m-data.exp index 3f3706dc7fa..1578b6f0ec1 100644 --- a/gdb/testsuite/gdb.cp/m-data.exp +++ b/gdb/testsuite/gdb.cp/m-data.exp @@ -18,7 +18,7 @@ # This file is part of the gdb testsuite -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp index 97a5645b53a..6dbb1716a02 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -19,7 +19,7 @@ # This file is part of the gdb testsuite -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/many-args.exp b/gdb/testsuite/gdb.cp/many-args.exp index 5c4a6bbbca9..2751c0064bc 100644 --- a/gdb/testsuite/gdb.cp/many-args.exp +++ b/gdb/testsuite/gdb.cp/many-args.exp @@ -19,7 +19,7 @@ # passed in registers. This test passes so many structures it is # hoped that some will need to be placed onto the stack. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp index be6297c8c0b..2f86c80d8fd 100644 --- a/gdb/testsuite/gdb.cp/mb-ctor.exp +++ b/gdb/testsuite/gdb.cp/mb-ctor.exp @@ -16,7 +16,7 @@ # Test that breakpoints on C++ constructors work, despite the # fact that gcc generates several versions of constructor function. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp index eb54db88c97..cf139354dd7 100644 --- a/gdb/testsuite/gdb.cp/mb-inline.exp +++ b/gdb/testsuite/gdb.cp/mb-inline.exp @@ -18,7 +18,7 @@ # This test verifies that setting breakpoint on line in inline # function will fire in all instantiations of that function. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile mb-inline1.cc mb-inline2.cc set hdrfile "${testfile}.h" diff --git a/gdb/testsuite/gdb.cp/member-name.exp b/gdb/testsuite/gdb.cp/member-name.exp index 2940342842a..90fa0971314 100644 --- a/gdb/testsuite/gdb.cp/member-name.exp +++ b/gdb/testsuite/gdb.cp/member-name.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp index ad703e0e3cf..0807627e3bc 100644 --- a/gdb/testsuite/gdb.cp/member-ptr.exp +++ b/gdb/testsuite/gdb.cp/member-ptr.exp @@ -21,7 +21,7 @@ set vhn "\\$\[0-9\]+" -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/meth-typedefs.exp b/gdb/testsuite/gdb.cp/meth-typedefs.exp index 5ae29f5f5f4..174f89b5d68 100644 --- a/gdb/testsuite/gdb.cp/meth-typedefs.exp +++ b/gdb/testsuite/gdb.cp/meth-typedefs.exp @@ -30,7 +30,7 @@ proc add {var name params expected {kind {func}}} { lappend result [list "${method_name}($params)" $expect] } -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests # Tests for c++/12266 et al standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp index bf65ce72a31..d4bb6fbb82d 100644 --- a/gdb/testsuite/gdb.cp/method.exp +++ b/gdb/testsuite/gdb.cp/method.exp @@ -32,7 +32,7 @@ # test running programs # -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp index 36a5662257d..04a064bb65b 100644 --- a/gdb/testsuite/gdb.cp/method2.exp +++ b/gdb/testsuite/gdb.cp/method2.exp @@ -18,7 +18,7 @@ # This tests setting a break in an ambiguous c++ method with # current_language set to c. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp index 350061ebd6b..8f14d489c0d 100644 --- a/gdb/testsuite/gdb.cp/misc.exp +++ b/gdb/testsuite/gdb.cp/misc.exp @@ -15,7 +15,7 @@ # This file was written by Fred Fish. (fnf@cygnus.com) -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp index bf4748cd4d3..6f6f7d20304 100644 --- a/gdb/testsuite/gdb.cp/namelessclass.exp +++ b/gdb/testsuite/gdb.cp/namelessclass.exp @@ -19,12 +19,8 @@ load_lib dwarf.exp # Do not run in environments which do not support C++. -if {[skip_cplus_tests]} { - return -} - # This test can only be run on x86-like targets which support DWARF. -require dwarf2_support +require dwarf2_support !skip_cplus_tests if {![istarget "x86_64-*-*"] || ![is_lp64_target]} { return 0 diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp index acdbc99d922..ed7943f4e69 100644 --- a/gdb/testsuite/gdb.cp/namespace.exp +++ b/gdb/testsuite/gdb.cp/namespace.exp @@ -25,7 +25,7 @@ -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc namespace1.cc diff --git a/gdb/testsuite/gdb.cp/nested-class-func-class.exp b/gdb/testsuite/gdb.cp/nested-class-func-class.exp index 91a8d51aa06..1b83f7b3e02 100644 --- a/gdb/testsuite/gdb.cp/nested-class-func-class.exp +++ b/gdb/testsuite/gdb.cp/nested-class-func-class.exp @@ -15,7 +15,7 @@ # Regression test for type printing of private nested classes. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/nested-types.exp b/gdb/testsuite/gdb.cp/nested-types.exp index 3901ec98d48..889d6d7e68c 100644 --- a/gdb/testsuite/gdb.cp/nested-types.exp +++ b/gdb/testsuite/gdb.cp/nested-types.exp @@ -19,7 +19,7 @@ # the corresponding source file. It then walks the nodes of this tree # to construct input suitable for passing to cp_test_ptype_class. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/nextoverthrow.exp b/gdb/testsuite/gdb.cp/nextoverthrow.exp index 9139671c4a7..e6565addafa 100644 --- a/gdb/testsuite/gdb.cp/nextoverthrow.exp +++ b/gdb/testsuite/gdb.cp/nextoverthrow.exp @@ -14,7 +14,7 @@ # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp b/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp index 5e3a3702f41..3d7ef3a8090 100644 --- a/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp +++ b/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp @@ -15,9 +15,7 @@ standard_testfile exceptprint.cc -if {[skip_cplus_tests]} { - return -1 -} +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/non-trivial-retval.exp b/gdb/testsuite/gdb.cp/non-trivial-retval.exp index 74427c0c42e..9b8c5b1c460 100644 --- a/gdb/testsuite/gdb.cp/non-trivial-retval.exp +++ b/gdb/testsuite/gdb.cp/non-trivial-retval.exp @@ -17,7 +17,7 @@ set additional_flags "" -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/nsalias.exp b/gdb/testsuite/gdb.cp/nsalias.exp index 19a36b87df5..3c2f5e5703f 100644 --- a/gdb/testsuite/gdb.cp/nsalias.exp +++ b/gdb/testsuite/gdb.cp/nsalias.exp @@ -18,11 +18,7 @@ load_lib dwarf.exp -require dwarf2_support - -if {[skip_cplus_tests]} { - return -} +require dwarf2_support !skip_cplus_tests standard_testfile .cc nsalias-dw.S diff --git a/gdb/testsuite/gdb.cp/overload-const.exp b/gdb/testsuite/gdb.cp/overload-const.exp index 120945c28a2..8ed9c689a5b 100644 --- a/gdb/testsuite/gdb.cp/overload-const.exp +++ b/gdb/testsuite/gdb.cp/overload-const.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp index 8c0ecb5551b..ed265fbc306 100644 --- a/gdb/testsuite/gdb.cp/overload.exp +++ b/gdb/testsuite/gdb.cp/overload.exp @@ -24,7 +24,7 @@ set ws "\[\r\n\t \]+" set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 12a67229654..a6714995f43 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -28,7 +28,7 @@ set timeout 15 # test running programs # -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/ovsrch.exp b/gdb/testsuite/gdb.cp/ovsrch.exp index 454c0202384..f13c2ee97ff 100644 --- a/gdb/testsuite/gdb.cp/ovsrch.exp +++ b/gdb/testsuite/gdb.cp/ovsrch.exp @@ -52,7 +52,7 @@ proc test_class {class} { gdb_test "break ${class}::hibob if (a_param == 3)" "Breakpoint (\[0-9\]).*" } -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # Test for c++/11734 standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc diff --git a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp index e45d556c8ba..62ae6b77689 100644 --- a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp +++ b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp @@ -25,10 +25,7 @@ # - have inlined copy ctor # - have deleted destructor -if {[skip_cplus_tests]} { - untested "c++ test skipped" - return -} +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/pass-by-ref.exp b/gdb/testsuite/gdb.cp/pass-by-ref.exp index ecf5899fa86..5424bcefc2a 100644 --- a/gdb/testsuite/gdb.cp/pass-by-ref.exp +++ b/gdb/testsuite/gdb.cp/pass-by-ref.exp @@ -68,10 +68,7 @@ # The companion test file pass-by-ref-2.exp also contains # manually-written cases. -if {[skip_cplus_tests]} { - untested "c++ test skipped" - return -} +require !skip_cplus_tests # The program source is generated in the output directory. # We use standard_testfile here to set convenience variables. diff --git a/gdb/testsuite/gdb.cp/pointer-to-member.exp b/gdb/testsuite/gdb.cp/pointer-to-member.exp index 56dedca6be5..b69edb1d74f 100644 --- a/gdb/testsuite/gdb.cp/pointer-to-member.exp +++ b/gdb/testsuite/gdb.cp/pointer-to-member.exp @@ -17,7 +17,7 @@ # Test printing c++ pointer-to-member. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/pr-1023.exp b/gdb/testsuite/gdb.cp/pr-1023.exp index 87af3ffd46e..3ed8f319469 100644 --- a/gdb/testsuite/gdb.cp/pr-1023.exp +++ b/gdb/testsuite/gdb.cp/pr-1023.exp @@ -18,7 +18,7 @@ # This file is part of the gdb testsuite. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/pr-1210.exp b/gdb/testsuite/gdb.cp/pr-1210.exp index 84fb1cc1a0d..021710fae68 100644 --- a/gdb/testsuite/gdb.cp/pr-1210.exp +++ b/gdb/testsuite/gdb.cp/pr-1210.exp @@ -17,7 +17,7 @@ # This file is part of the gdb testsuite. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/pr-574.exp b/gdb/testsuite/gdb.cp/pr-574.exp index ad8b296cde3..2ea821011a3 100644 --- a/gdb/testsuite/gdb.cp/pr-574.exp +++ b/gdb/testsuite/gdb.cp/pr-574.exp @@ -20,7 +20,7 @@ # This file is part of the gdb testsuite -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/pr10728.exp b/gdb/testsuite/gdb.cp/pr10728.exp index 07570ac1e30..5fbbace53f6 100644 --- a/gdb/testsuite/gdb.cp/pr10728.exp +++ b/gdb/testsuite/gdb.cp/pr10728.exp @@ -17,7 +17,7 @@ set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/pr17132.exp b/gdb/testsuite/gdb.cp/pr17132.exp index fb4f8729789..fb9e739a547 100644 --- a/gdb/testsuite/gdb.cp/pr17132.exp +++ b/gdb/testsuite/gdb.cp/pr17132.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/pr17494.exp b/gdb/testsuite/gdb.cp/pr17494.exp index 103cff64173..48a5c2b7a2c 100644 --- a/gdb/testsuite/gdb.cp/pr17494.exp +++ b/gdb/testsuite/gdb.cp/pr17494.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/pr9067.exp b/gdb/testsuite/gdb.cp/pr9067.exp index 5635b0dda14..cde7b20e41a 100644 --- a/gdb/testsuite/gdb.cp/pr9067.exp +++ b/gdb/testsuite/gdb.cp/pr9067.exp @@ -15,7 +15,7 @@ set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/pr9631.exp b/gdb/testsuite/gdb.cp/pr9631.exp index 888eef54f7b..3a9e0af4db3 100644 --- a/gdb/testsuite/gdb.cp/pr9631.exp +++ b/gdb/testsuite/gdb.cp/pr9631.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/print-demangle.exp b/gdb/testsuite/gdb.cp/print-demangle.exp index fbfbb953f59..733cd4e360a 100644 --- a/gdb/testsuite/gdb.cp/print-demangle.exp +++ b/gdb/testsuite/gdb.cp/print-demangle.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile bool.cc diff --git a/gdb/testsuite/gdb.cp/print-method-args.exp b/gdb/testsuite/gdb.cp/print-method-args.exp index 8e711e0d35d..8c5d5e2ef3e 100644 --- a/gdb/testsuite/gdb.cp/print-method-args.exp +++ b/gdb/testsuite/gdb.cp/print-method-args.exp @@ -17,7 +17,7 @@ # This test checks that a constructor and destructor are printed the same. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/printmethod.exp b/gdb/testsuite/gdb.cp/printmethod.exp index a7cf305975f..0cdb271b85e 100644 --- a/gdb/testsuite/gdb.cp/printmethod.exp +++ b/gdb/testsuite/gdb.cp/printmethod.exp @@ -19,7 +19,7 @@ # This file is part of the gdb testsuite -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/psmang.exp b/gdb/testsuite/gdb.cp/psmang.exp index a27a3f4a5c5..ba3e75666d9 100644 --- a/gdb/testsuite/gdb.cp/psmang.exp +++ b/gdb/testsuite/gdb.cp/psmang.exp @@ -176,7 +176,7 @@ # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile psmang1.cc psmang2.cc diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp index 9910d882bf7..ad64df6d0b9 100644 --- a/gdb/testsuite/gdb.cp/psymtab-parameter.exp +++ b/gdb/testsuite/gdb.cp/psymtab-parameter.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp index 5865d985433..4f0a6d98be0 100644 --- a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp +++ b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/ptype-flags.exp b/gdb/testsuite/gdb.cp/ptype-flags.exp index 02eff4ac59d..e09447ed515 100644 --- a/gdb/testsuite/gdb.cp/ptype-flags.exp +++ b/gdb/testsuite/gdb.cp/ptype-flags.exp @@ -15,7 +15,7 @@ set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/punctuator.exp b/gdb/testsuite/gdb.cp/punctuator.exp index 4157182349e..62433721893 100644 --- a/gdb/testsuite/gdb.cp/punctuator.exp +++ b/gdb/testsuite/gdb.cp/punctuator.exp @@ -17,7 +17,7 @@ # This file is part of the gdb testsuite -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests gdb_exit gdb_start diff --git a/gdb/testsuite/gdb.cp/re-set-overloaded.exp b/gdb/testsuite/gdb.cp/re-set-overloaded.exp index d083b410316..d309c46694b 100644 --- a/gdb/testsuite/gdb.cp/re-set-overloaded.exp +++ b/gdb/testsuite/gdb.cp/re-set-overloaded.exp @@ -13,8 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } -if { [skip_shlib_tests] } { continue } +require !skip_cplus_tests !skip_shlib_tests standard_testfile bool.cc .cc diff --git a/gdb/testsuite/gdb.cp/ref-params.exp b/gdb/testsuite/gdb.cp/ref-params.exp index 7d728bd2bca..b4c6cee8914 100644 --- a/gdb/testsuite/gdb.cp/ref-params.exp +++ b/gdb/testsuite/gdb.cp/ref-params.exp @@ -20,7 +20,7 @@ # test running programs # -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp index 05b3f68b445..c1b9866cf67 100644 --- a/gdb/testsuite/gdb.cp/ref-types.exp +++ b/gdb/testsuite/gdb.cp/ref-types.exp @@ -20,7 +20,7 @@ # test running programs # -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp index 8955cd60b13..08320536895 100644 --- a/gdb/testsuite/gdb.cp/rtti.exp +++ b/gdb/testsuite/gdb.cp/rtti.exp @@ -26,7 +26,7 @@ # (involving templates, in particular) where this problem triggers # because GDB and GCC have different ideas what a class is called. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests # # test running programs diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp b/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp index 40be1b9955c..f1399ef1657 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp @@ -17,7 +17,7 @@ # C++11 rvalue reference type casting tests, based on gdb.cp/casts.exp. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp index 86e14a8a6e9..94ac3841eb6 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp @@ -18,7 +18,7 @@ # Tests for overloaded member functions with rvalue reference parameters, # based on gdb.cp/overload.exp. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp index f83d01b77d1..46c32cebf9a 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp @@ -16,7 +16,7 @@ # Tests for rvalue reference parameters of types and their subtypes in GDB, # based on gdb.cp/ref-params.exp. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp b/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp index 118cc1625f6..52e8c682ef7 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp @@ -18,7 +18,7 @@ standard_testfile .cc -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests if {[prepare_for_testing ${testfile}.exp $testfile $srcfile \ {debug c++ additional_flags="-std=gnu++11"}] } { diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp index 3f94b7925fd..f2963be0c52 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp @@ -16,7 +16,7 @@ # Tests for reference types with short type variables in GDB, based on # gdb.cp/ref-types.exp. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/scope-err.exp b/gdb/testsuite/gdb.cp/scope-err.exp index 1ec8d60d752..e2dec7326a4 100644 --- a/gdb/testsuite/gdb.cp/scope-err.exp +++ b/gdb/testsuite/gdb.cp/scope-err.exp @@ -16,9 +16,7 @@ # Tests for linespec errors with C++. # Derived from gdb.linespec/ls-errs.exp. -if {[skip_cplus_tests]} { - return -} +require !skip_cplus_tests standard_testfile .cc set exefile $testfile diff --git a/gdb/testsuite/gdb.cp/static-method.exp b/gdb/testsuite/gdb.cp/static-method.exp index 3180e289779..282b5b7ce0d 100644 --- a/gdb/testsuite/gdb.cp/static-method.exp +++ b/gdb/testsuite/gdb.cp/static-method.exp @@ -37,7 +37,7 @@ proc test_breakpoint {func result} { } } -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests # Tests for c++/12750 standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/static-print-quit.exp b/gdb/testsuite/gdb.cp/static-print-quit.exp index ba8e35bee99..f7f3ec095eb 100644 --- a/gdb/testsuite/gdb.cp/static-print-quit.exp +++ b/gdb/testsuite/gdb.cp/static-print-quit.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/static-typedef-print.exp b/gdb/testsuite/gdb.cp/static-typedef-print.exp index f72314df442..91fa658c437 100644 --- a/gdb/testsuite/gdb.cp/static-typedef-print.exp +++ b/gdb/testsuite/gdb.cp/static-typedef-print.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/stub-array-size.exp b/gdb/testsuite/gdb.cp/stub-array-size.exp index f78308d3e31..9492c47a72c 100644 --- a/gdb/testsuite/gdb.cp/stub-array-size.exp +++ b/gdb/testsuite/gdb.cp/stub-array-size.exp @@ -18,7 +18,7 @@ # Test size of arrays of stubbed types (structures where the full definition # is not immediately available). -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc stub-array-size2.cc diff --git a/gdb/testsuite/gdb.cp/subtypes.exp b/gdb/testsuite/gdb.cp/subtypes.exp index 7dfec3e2440..67372c59a65 100644 --- a/gdb/testsuite/gdb.cp/subtypes.exp +++ b/gdb/testsuite/gdb.cp/subtypes.exp @@ -16,7 +16,7 @@ # Test for subtype definitions, i.e., types defined in classes, functions, # etc. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/temargs.exp b/gdb/testsuite/gdb.cp/temargs.exp index 7459d50f15f..4d7677ea725 100644 --- a/gdb/testsuite/gdb.cp/temargs.exp +++ b/gdb/testsuite/gdb.cp/temargs.exp @@ -17,9 +17,7 @@ # This file is part of the gdb testsuite. -if {[skip_cplus_tests]} { - return -} +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index e461b946d94..41709b503e3 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -17,7 +17,7 @@ set ws "\[\r\n\t \]+" -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/typed-enum.exp b/gdb/testsuite/gdb.cp/typed-enum.exp index 424c70a848e..ad6aa29d2aa 100644 --- a/gdb/testsuite/gdb.cp/typed-enum.exp +++ b/gdb/testsuite/gdb.cp/typed-enum.exp @@ -15,7 +15,7 @@ # # Check if unsigned typedef are handled correctly with typed enums. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/typedef-base.exp b/gdb/testsuite/gdb.cp/typedef-base.exp index ef6f83b8641..7a0d5f237d8 100644 --- a/gdb/testsuite/gdb.cp/typedef-base.exp +++ b/gdb/testsuite/gdb.cp/typedef-base.exp @@ -15,7 +15,7 @@ # # Make sure that inheritance through a typedef is well handled. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/typedef-operator.exp b/gdb/testsuite/gdb.cp/typedef-operator.exp index 96fd9f133bd..f0cfc4b011d 100644 --- a/gdb/testsuite/gdb.cp/typedef-operator.exp +++ b/gdb/testsuite/gdb.cp/typedef-operator.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/typeid.exp b/gdb/testsuite/gdb.cp/typeid.exp index 66e345a5a06..b4766d003dc 100644 --- a/gdb/testsuite/gdb.cp/typeid.exp +++ b/gdb/testsuite/gdb.cp/typeid.exp @@ -15,9 +15,7 @@ standard_testfile .cc -if {[skip_cplus_tests]} { - return -1 -} +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp index 0ddfd1aabdd..aa615986ee2 100644 --- a/gdb/testsuite/gdb.cp/var-tag.exp +++ b/gdb/testsuite/gdb.cp/var-tag.exp @@ -17,7 +17,7 @@ # Test expressions in which variable names shadow tag names. -if {[skip_cplus_tests]} { return } +require !skip_cplus_tests standard_testfile var-tag.cc var-tag-2.cc var-tag-3.cc var-tag-4.cc diff --git a/gdb/testsuite/gdb.cp/virtbase.exp b/gdb/testsuite/gdb.cp/virtbase.exp index 4cc79946b62..8408235d507 100644 --- a/gdb/testsuite/gdb.cp/virtbase.exp +++ b/gdb/testsuite/gdb.cp/virtbase.exp @@ -15,7 +15,7 @@ # This file is part of the gdb testsuite. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/virtbase2.exp b/gdb/testsuite/gdb.cp/virtbase2.exp index d15e009f25e..9b18f599703 100644 --- a/gdb/testsuite/gdb.cp/virtbase2.exp +++ b/gdb/testsuite/gdb.cp/virtbase2.exp @@ -15,7 +15,7 @@ # Make sure printing virtual base class data member works correctly (PR16841) -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp index 7ca24cba353..89c5b6da7a5 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.exp +++ b/gdb/testsuite/gdb.cp/virtfunc.exp @@ -18,7 +18,7 @@ set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/virtfunc2.exp b/gdb/testsuite/gdb.cp/virtfunc2.exp index 5e724540f7f..de9ed11b9f8 100644 --- a/gdb/testsuite/gdb.cp/virtfunc2.exp +++ b/gdb/testsuite/gdb.cp/virtfunc2.exp @@ -18,7 +18,7 @@ set nl "\[\r\n\]+" -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib "cp-support.exp" diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch-cp.exp index 64694c628d6..62429f76041 100644 --- a/gdb/testsuite/gdb.cp/watch-cp.exp +++ b/gdb/testsuite/gdb.cp/watch-cp.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] || [skip_hw_watchpoint_tests]} { return } +require !skip_cplus_tests !skip_hw_watchpoint_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp index 4af74adccc1..715152829eb 100644 --- a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp +++ b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp index 96266867dd5..422e3f8559d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp @@ -18,7 +18,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp index f0baf76bf4e..867cd1b6a6c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp @@ -17,7 +17,7 @@ # type containing a static member of the same type. # Still no C++ compiler is used. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp index 510631c0364..4fd54825718 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp @@ -17,7 +17,7 @@ # type containing a static member of the same type. # Still no C++ compiler is used. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp index 266fef4e836..9199f3c7a5b 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp @@ -18,7 +18,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp index b30cf2ec48c..6102a96d988 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp @@ -18,7 +18,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp index 985d8f70e72..bcff7bb7729 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-array.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp @@ -16,9 +16,7 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a global array whose location is a DW_OP_addr. -if [skip_cplus_tests] { - return -} +require !skip_cplus_tests load_lib dwarf.exp diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp index fb1a95838f9..13608eaa8ff 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-const.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp @@ -16,9 +16,7 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a DW_AT_const_value. -if [skip_cplus_tests] { - return -} +require !skip_cplus_tests load_lib dwarf.exp diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp index 1532d11f5d9..e01aeafc84b 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-global.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp @@ -16,9 +16,7 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a global variable whose location is a DW_OP_addr. -if [skip_cplus_tests] { - return -} +require !skip_cplus_tests load_lib dwarf.exp diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp index 455b38cf8cd..822256bea38 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp @@ -16,9 +16,7 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a global struct whose location is a DW_OP_addr. -if [skip_cplus_tests] { - return -} +require !skip_cplus_tests load_lib dwarf.exp diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp index 4806ae19a39..f1dfed83e6a 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp @@ -22,9 +22,7 @@ # on specific compiler versions or use of optimization switches, in # this case -flto. -if [skip_cplus_tests] { - return -} +require !skip_cplus_tests load_lib dwarf.exp diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp index 34dd1b361d4..1abc4141041 100644 --- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp +++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp index f69f7ae9d0e..c3a75c35c4a 100644 --- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp +++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp index 9ecca831b68..22784554014 100644 --- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp +++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile main.c -dw4.S diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp index f732410e494..f0bea26faba 100644 --- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp +++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile main.c .S diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp index a02ebbf109e..f77a136de1f 100644 --- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp +++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp index 243ce2f7f79..f35f0af5368 100644 --- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp +++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp index 6ee27055045..253295d6538 100644 --- a/gdb/testsuite/gdb.dwarf2/subrange.exp +++ b/gdb/testsuite/gdb.dwarf2/subrange.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile method-ptr.cc -dw.S diff --git a/gdb/testsuite/gdb.guile/scm-value-cc.exp b/gdb/testsuite/gdb.guile/scm-value-cc.exp index 0b314ff7d5a..3e68707ddbc 100644 --- a/gdb/testsuite/gdb.guile/scm-value-cc.exp +++ b/gdb/testsuite/gdb.guile/scm-value-cc.exp @@ -18,7 +18,7 @@ load_lib gdb-guile.exp -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.linespec/break-ask.exp b/gdb/testsuite/gdb.linespec/break-ask.exp index 91dc5d59038..1895a509c25 100644 --- a/gdb/testsuite/gdb.linespec/break-ask.exp +++ b/gdb/testsuite/gdb.linespec/break-ask.exp @@ -15,10 +15,7 @@ standard_testfile lspec.cc -if {[skip_cplus_tests]} { - unsupported "skipping C++ tests" - return -} +require !skip_cplus_tests set opts {debug c++} set objfile1 [standard_output_file ${testfile}one.o] diff --git a/gdb/testsuite/gdb.linespec/cpexplicit.exp b/gdb/testsuite/gdb.linespec/cpexplicit.exp index 9d2c7c922b0..959e399663c 100644 --- a/gdb/testsuite/gdb.linespec/cpexplicit.exp +++ b/gdb/testsuite/gdb.linespec/cpexplicit.exp @@ -15,10 +15,7 @@ # Tests for explicit linespecs -if {[skip_cplus_tests]} { - unsupported "skipping C++ tests" - return -} +require !skip_cplus_tests standard_testfile .cc set exefile $testfile diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp index f770ac802dd..1a819cab9b4 100644 --- a/gdb/testsuite/gdb.linespec/linespec.exp +++ b/gdb/testsuite/gdb.linespec/linespec.exp @@ -22,10 +22,7 @@ set exefile $testfile set baseone base/one/thefile.cc set basetwo base/two/thefile.cc -if {[skip_cplus_tests]} { - unsupported "skipping c++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $exefile \ [list $srcfile $baseone $basetwo] \ diff --git a/gdb/testsuite/gdb.linespec/ls-dollar.exp b/gdb/testsuite/gdb.linespec/ls-dollar.exp index 7d826776d69..4ce57572050 100644 --- a/gdb/testsuite/gdb.linespec/ls-dollar.exp +++ b/gdb/testsuite/gdb.linespec/ls-dollar.exp @@ -18,10 +18,7 @@ standard_testfile .cc set exefile $testfile -if {[skip_cplus_tests]} { - unsupported "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $exefile $srcfile \ {debug nowarnings c++}]} { diff --git a/gdb/testsuite/gdb.linespec/skip-two.exp b/gdb/testsuite/gdb.linespec/skip-two.exp index b936d700adc..30dd7cb0641 100644 --- a/gdb/testsuite/gdb.linespec/skip-two.exp +++ b/gdb/testsuite/gdb.linespec/skip-two.exp @@ -20,10 +20,7 @@ set execfile $testfile set baseone base/one/thefile.cc set basetwo base/two/thefile.cc -if {[skip_cplus_tests]} { - unsupported "skipping C++ tests" - return -} +require !skip_cplus_tests if {[prepare_for_testing "failed to prepare" $execfile \ [list $srcfile $baseone $basetwo] \ diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp index 14cf3b610c0..65279de1dce 100644 --- a/gdb/testsuite/gdb.mi/gdb792.exp +++ b/gdb/testsuite/gdb.mi/gdb792.exp @@ -16,7 +16,7 @@ # Test that children of classes are properly reported. Regression # test for gdb/792. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp index bcb9c7e5c35..a130acc193a 100644 --- a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp +++ b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp @@ -15,7 +15,7 @@ # Test the -catch-throw, -catch-rethrow, and -catch-catch MI commands. -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp index f4e45fd9b64..7af5d3393f5 100644 --- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp +++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp b/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp index 1571934d48e..645cbefca80 100644 --- a/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp +++ b/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp @@ -17,9 +17,7 @@ # errors is generated when setting a breakpoint in a non-existent # file with a Windows-style logical drive names and C++. -if {[skip_cplus_tests]} { - return -} +require !skip_cplus_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp index 4589a5ddbaf..cc683ad0584 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cp.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp index 42673f9d4e9..6ae6760ba99 100644 --- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp +++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { return } +require !skip_cplus_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp index bbad5359a4d..bb42b56b5a8 100644 --- a/gdb/testsuite/gdb.python/py-explore-cc.exp +++ b/gdb/testsuite/gdb.python/py-explore-cc.exp @@ -16,7 +16,7 @@ # This file is part of the GDB testsuite. It tests the mechanism # exposing values to Python. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile py-explore.cc diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp index 5bfb100e68f..98eb94f5d2c 100644 --- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp +++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp @@ -17,7 +17,7 @@ # exposing rvalue reference values to Python. It is based on # gdb.python/py-value-cc.exp. -if {[skip_cplus_tests]} { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp index da2054cd43c..1383e3a1089 100644 --- a/gdb/testsuite/gdb.python/py-template.exp +++ b/gdb/testsuite/gdb.python/py-template.exp @@ -16,7 +16,7 @@ # This file is part of the GDB testsuite. It tests the mechanism # exposing values to Python. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp index 1709e00ead0..abf95e5c486 100644 --- a/gdb/testsuite/gdb.python/py-typeprint.exp +++ b/gdb/testsuite/gdb.python/py-typeprint.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests load_lib gdb-python.exp load_lib cp-support.exp diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp index 49fa8989a7a..f62c1df4aa5 100644 --- a/gdb/testsuite/gdb.python/py-value-cc.exp +++ b/gdb/testsuite/gdb.python/py-value-cc.exp @@ -16,7 +16,7 @@ # This file is part of the GDB testsuite. It tests the mechanism # exposing values to Python. -if { [skip_cplus_tests] } { continue } +require !skip_cplus_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp index 50d7bbe64eb..8db5c39080b 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.exp +++ b/gdb/testsuite/gdb.python/py-xmethods.exp @@ -18,10 +18,7 @@ load_lib gdb-python.exp -if { [skip_cplus_tests] } { - untested "skipping C++ tests" - return -} +require !skip_cplus_tests standard_testfile py-xmethods.cc