[1/1] testsuite: Support test execution timeout factor as a keyword
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
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.
---
gcc/testsuite/lib/timeout-dg.exp | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
gcc-test-test-timeout-factor.diff
Comments
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
===================================================================
@@ -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]
+ }
+}