From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 673D53858428; Wed, 22 Feb 2023 14:49:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 673D53858428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677077383; bh=nJd8vaLA6FmUiVX73Qle2o67zJOBzkr9+oMkWfBfgmE=; h=From:To:Subject:Date:From; b=drOtYRwiORS+Fw3HZ41GjrMZVVL7alTS+sJnrcl1UEn0j9+NerlJ/Qi8Yot5j4azy 5h8gVHK1ALxRpOdrbeF7PO/lU4b88Y7EH5IrHHsqHszfQ8XWu1JwcdfoT+W6MAz/Ke 9yiktQkpOmUgE/xNp1OMNROv6Nfm3qqadNkLekfc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] Skip module_cmi_p and related unsupported module test X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: 8ed45ba9fc761713acaff114efd881eda7c17c06 X-Git-Newrev: 69f5cd67c5647ba7aa7eaf5986ad4968e2f76b51 Message-Id: <20230222144943.673D53858428@sourceware.org> Date: Wed, 22 Feb 2023 14:49:43 +0000 (GMT) List-Id: https://gcc.gnu.org/g:69f5cd67c5647ba7aa7eaf5986ad4968e2f76b51 commit 69f5cd67c5647ba7aa7eaf5986ad4968e2f76b51 Author: Alexandre Oliva Date: Thu Feb 16 06:52:06 2023 -0300 Skip module_cmi_p and related unsupported module test When a multi-source module is found to be unsupported, we fail module_cmi_p and subsequent sources. Override proc unsupported to mark the result in module_do, and test it to skip module_cmp_p and subsequent related tests. for gcc/testsuite/ChangeLog * g++.dg/modules/modules.exp: Override unsupported to update module_do, and test it after dg-test. Diff: --- gcc/testsuite/g++.dg/modules/modules.exp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp index 61994b05945..e66b2082f20 100644 --- a/gcc/testsuite/g++.dg/modules/modules.exp +++ b/gcc/testsuite/g++.dg/modules/modules.exp @@ -315,6 +315,17 @@ proc module-check-requirements { tests } { # cleanup any detritus from previous run cleanup_module_files [find $DEFAULT_REPO *.gcm] +# Override unsupported to set the second element of module_do to "N", +# so that, after an unsupported result in dg-test, we can skip rather +# than fail subsequent related tests. +set module_do {"compile" "P"} +rename unsupported saved-unsupported +proc unsupported { args } { + global module_do + lset module_do 1 "N" + return [saved-unsupported $args] +} + # not grouped tests, sadly tcl doesn't have negated glob foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \ "$srcdir/$subdir/*_?.\[CH\]"] { @@ -327,6 +338,9 @@ foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \ set module_cmis {} verbose "Testing $nshort $std" 1 dg-test $test "$std" $DEFAULT_MODFLAGS + if { [lindex $module_do 1] == "N" } { + continue + } set testcase [string range $test [string length "$srcdir/"] end] cleanup_module_files [module_cmi_p $testcase $module_cmis] } @@ -372,6 +386,9 @@ foreach src [lsort [find $srcdir/$subdir {*_a.[CHX}]] { } } dg-test -keep-output $test "$std" $DEFAULT_MODFLAGS + if { [lindex $module_do 1] == "N" } { + break + } set testcase [string range $test [string length "$srcdir/"] end] lappend mod_files [module_cmi_p $testcase $module_cmis] }