Message ID | alpine.DEB.2.20.2312111745330.5892@tpp.orcam.me.uk |
---|---|
State | New |
Headers | show |
Series | Support per-test execution timeout factor | expand |
On 12/12/23 07:04, Maciej W. Rozycki wrote: > Add support for the `dg-test-timeout-factor' keyword letting a test > case scale the wait timeout used for code execution, analogously to > `dg-timeout-factor' used for code compilation. This is useful for > particularly slow test cases for which increasing the wait timeout > globally would be excessive. > > gcc/testsuite/ > * lib/timeout-dg.exp (dg-test-timeout-factor): New procedure. OK jeff
Index: gcc/gcc/testsuite/lib/timeout-dg.exp =================================================================== --- gcc.orig/gcc/testsuite/lib/timeout-dg.exp +++ gcc/gcc/testsuite/lib/timeout-dg.exp @@ -47,3 +47,20 @@ proc dg-timeout-factor { args } { set timeout_factor [lindex $args 0] } } + +# +# dg-test-timeout-factor -- Scale the test execution timeout limit +# + +proc dg-test-timeout-factor { args } { + global test_timeout_factor + + set args [lreplace $args 0 0] + if { [llength $args] > 1 } { + if { [dg-process-target [lindex $args 1]] == "S" } { + set test_timeout_factor [lindex $args 0] + } + } else { + set test_timeout_factor [lindex $args 0] + } +}