]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Disable parallel testing for 'rust/compile/nr2/compile.exp' [PR119508]
authorThomas Schwinge <tschwinge@baylibre.com>
Sat, 19 Apr 2025 13:49:34 +0000 (15:49 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Sat, 19 Apr 2025 19:15:54 +0000 (21:15 +0200)
..., using the standard idiom.  This '*.exp' file doesn't adhere to the
parallel testing protocol as defined in 'gcc/testsuite/lib/gcc-defs.exp'.

This also restores proper behavior for '*.exp' files executing after (!) this
one, which erroneously caused hundreds or even thousands of individual test
cases get duplicated vs. skipped, randomly, depending on the '-jN' level.

PR testsuite/119508
gcc/testsuite/
* rust/compile/nr2/compile.exp: Disable parallel testing.

gcc/testsuite/rust/compile/nr2/compile.exp

index 4d91dd004a3d972195d258e6ed68348702bb8f87..9e15cdd7253a7117b2d946bb90286d444af21ea7 100644 (file)
 # Load support procs.
 load_lib rust-dg.exp
 
+# These tests don't run runtest_file_p consistently if it
+# doesn't return the same values, so disable parallelization
+# of this *.exp file.  The first parallel runtest to reach
+# this will run all the tests serially.
+if ![gcc_parallel_test_run_p compile] {
+    return
+}
+gcc_parallel_test_enable 0
+
 # Initialize `dg'.
 dg-init
 
@@ -136,3 +145,5 @@ namespace eval rust-nr2-ns {
 
 # All done.
 dg-finish
+
+gcc_parallel_test_enable 1