aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb@gnu.org>2022-10-01 19:45:06 -0500
committerJacob Bachmeyer <jcb@gnu.org>2022-10-01 19:45:06 -0500
commitbbc86915e45674be1f83bf341d76f37331496fc1 (patch)
tree9c16c0a1d991dcef21024f179896cbd2109c2317
parent51e4b3f6891b42bfa3b5617a0a52193348f74efe (diff)
Avoid needless errors in internal unit test infrastructure
-rw-r--r--ChangeLog3
-rw-r--r--testsuite/runtest.libs/mockutil.tcl10
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6875e51..1a1d5e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
PR58065
+ * testsuite/runtest.libs/mockutil.tcl (test_proc_with_mocks):
+ Report test failure instead of raising errors.
+
* testsuite/runtest.libs/dg.test: Add more unit tests.
2022-09-30 Jacob Bachmeyer <jcb@gnu.org>
diff --git a/testsuite/runtest.libs/mockutil.tcl b/testsuite/runtest.libs/mockutil.tcl
index 20b6b9b..4614274 100644
--- a/testsuite/runtest.libs/mockutil.tcl
+++ b/testsuite/runtest.libs/mockutil.tcl
@@ -236,8 +236,9 @@ proc test_proc_with_mocks { name sicmd code args } {
} elseif { $callpos eq "U" } {
# prefix selects one unique call
if { [llength $calls] != 1 } {
- error "expected unique call"
- return
+ verbose " expected unique call... failed!"
+ set result fail
+ continue
}
if { ![match_argpat $argpat [lindex $calls 0]] } {
verbose " failed!"
@@ -249,8 +250,9 @@ proc test_proc_with_mocks { name sicmd code args } {
set result fail
}
} else {
- error "failed to select trace record"
- return
+ verbose " expected trace record not found... failed!"
+ set result fail
+ continue
}
}