libstdc++: Increase timeout for tests in debug mode
authorJonathan Wakely <jwakely@redhat.com>
Tue, 15 Dec 2020 15:39:58 +0000 (15:39 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 15 Dec 2020 15:39:58 +0000 (15:39 +0000)
These tests FAIL when testing debug mode with a small tool_timeout
value. Give them a longer relative timeout.

libstdc++-v3/ChangeLog:

* testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
Add dg-timeout-factor directive.
* testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc:
Increase timeout factor from 2.0 to 3.0.
* testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_debug-mode):
Define "debug-mode" as an effective-target keyword.

libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc
libstdc++-v3/testsuite/lib/libstdc++.exp

index 14a75358db4681ccbc27624c82f1335543c43179..65aafdcf03da121fd2d0ee2801f49cf4a015f0ec 100644 (file)
@@ -15,6 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+// { dg-timeout-factor 2 { target debug-mode } }
+
 #include <algorithm>
 #include <vector>
 #include <deque>
index 627f3864347a5bc2d85b6ba4933cfbea96144870..411a906d598f34084d4bde1fc3358ae4f4bf4aa9 100644 (file)
@@ -2,7 +2,7 @@
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
+// { dg-timeout-factor 3.0 }
 
 // -*- C++ -*-
 
index cd7b1118e260de0066854cccf66ebfc7d0144e3d..dd1b45c34914daf1b498a27cd60a609193b825f4 100644 (file)
@@ -2,7 +2,7 @@
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
+// { dg-timeout-factor 3.0 }
 
 // -*- C++ -*-
 
index 35817a8870a4a62b3542b4ce18d0f31dd4358a87..aeb881f91a6b0eb2360bfb0033459279e43bd33f 100644 (file)
@@ -1004,6 +1004,11 @@ proc check_v3_target_debug_mode { } {
     }]
 }
 
+# Define "debug-mode" as an effective-target keyword.
+proc check_effective_target_debug-mode { } {
+    return [check_v3_target_debug_mode]
+}
+
 # Return 1 if normal mode is active, 0 otherwise.
 # i.e. neither Debug Mode nor Parallel Mode is active.
 proc check_v3_target_normal_mode { } {