public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] testsuite: Skip module_cmi_p and related unsupported module test
@ 2023-02-22 17:23 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2023-02-22 17:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:811faac4e564b75c783a1377912ce0431131bdce

commit 811faac4e564b75c783a1377912ce0431131bdce
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 16 06:52:06 2023 -0300

    testsuite: 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]
 		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: Skip module_cmi_p and related unsupported module test
@ 2023-02-23 13:48 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2023-02-23 13:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0fdc0acd11dd91b6c59a157877779457082e71e0

commit 0fdc0acd11dd91b6c59a157877779457082e71e0
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 23 10:30:33 2023 -0300

    testsuite: 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:

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] testsuite: Skip module_cmi_p and related unsupported module test
@ 2023-02-22 14:52 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2023-02-22 14:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a78f08de56c5e8c4fcce118a05b46d87bb57ccab

commit a78f08de56c5e8c4fcce118a05b46d87bb57ccab
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 16 06:52:06 2023 -0300

    testsuite: 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]
 		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-23 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 17:23 [gcc(refs/users/aoliva/heads/testme)] testsuite: Skip module_cmi_p and related unsupported module test Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2023-02-23 13:48 Alexandre Oliva
2023-02-22 14:52 Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).