]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libphobos: Run unittest tests with dg-runtest.
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 27 Feb 2025 22:37:21 +0000 (23:37 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Thu, 27 Feb 2025 22:52:49 +0000 (23:52 +0100)
Use `dg-runtest' test driver rather than `dg-test' to run the libphobos
unittest testsuite, same as all other libphobos tests.  This prevents
the tests from being ran multiple times when parallelized.

Set `libphobos_test_name' as well so that all tests get a unique name.

libphobos/ChangeLog:

* testsuite/libphobos.unittest/unittest.exp: Use `dg-runtest' rather
than `dg-test'.  Set `libphobos_test_name'.

libphobos/testsuite/libphobos.unittest/unittest.exp

index 3e2d3b84cdce1d1c6744df1bf10ea2bf07bda2ec..0b0e3e3ce09d339eb479b460dfee324d0a1f4fd6 100644 (file)
@@ -42,8 +42,10 @@ foreach unit_test $unit_test_list {
     set expected_fail [lindex $unit_test 1]
 
     foreach test $tests {
+        set libphobos_test_name "[dg-trim-dirname $srcdir $test] $test_flags"
         set shouldfail $expected_fail
-        dg-test $test "" $test_flags
+        dg-runtest $test "" $test_flags
+        set libphobos_test_name ""
     }
 
     set shouldfail 0