public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] Skip module_cmi_p and related unsupported module test
@ 2023-02-22 14:49 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2023-02-22 14:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:69f5cd67c5647ba7aa7eaf5986ad4968e2f76b51
commit 69f5cd67c5647ba7aa7eaf5986ad4968e2f76b51
Author: Alexandre Oliva <oliva@adacore.com>
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]
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] Skip module_cmi_p and related unsupported module test
@ 2023-02-16 11:12 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2023-02-16 11:12 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:37e1c179655dcb4461d66f8dcdb0e4627bd3d0b9
commit 37e1c179655dcb4461d66f8dcdb0e4627bd3d0b9
Author: Alexandre Oliva <oliva@adacore.com>
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 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp
index 61994b05945..ba1287427bf 100644
--- a/gcc/testsuite/g++.dg/modules/modules.exp
+++ b/gcc/testsuite/g++.dg/modules/modules.exp
@@ -315,6 +315,14 @@ proc module-check-requirements { tests } {
# cleanup any detritus from previous run
cleanup_module_files [find $DEFAULT_REPO *.gcm]
+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 +335,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 +383,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] 2+ messages in thread
end of thread, other threads:[~2023-02-22 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 14:49 [gcc(refs/users/aoliva/heads/testme)] Skip module_cmi_p and related unsupported module test Alexandre Oliva
-- strict thread matches above, loose matches on Subject: below --
2023-02-16 11:12 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).