dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH GCC 1/1] testsuite: Support test execution timeout factor as a ke


From: Maciej W. Rozycki
Subject: [PATCH GCC 1/1] testsuite: Support test execution timeout factor as a keyword
Date: Tue, 12 Dec 2023 14:04:51 +0000 (GMT)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

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
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]
+    }
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]