On 06/15/2018 05:33 PM, Andreas Schwab wrote:
> On Jun 15 2018, Tom de Vries <tdevr...@suse.de> wrote:
> 
>> Where do you see the duplication?
> 
> The problem is actually that dg-final.exp is run multiple times, once
> for every parallel execution of the testsuite.

Ah, I see. Thanks for noting that.

This patch fixes it. I'll apply, unless there are objections.

Thanks,
- Tom
[testsuite] Run dg-final.exp sequentially

2018-06-15  Tom de Vries  <tdevr...@suse.de>

	* gcc.dg-selftests/dg-final.exp: Force sequential execution.

---
 gcc/testsuite/gcc.dg-selftests/dg-final.exp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/testsuite/gcc.dg-selftests/dg-final.exp b/gcc/testsuite/gcc.dg-selftests/dg-final.exp
index 6aa0f64db87..79ffeb3b14f 100644
--- a/gcc/testsuite/gcc.dg-selftests/dg-final.exp
+++ b/gcc/testsuite/gcc.dg-selftests/dg-final.exp
@@ -98,4 +98,9 @@ proc dg_final_directive_check_num_args {} {
     unset testname_with_flags
 }
 
+if ![gcc_parallel_test_run_p dg-final] {
+    return
+}
+gcc_parallel_test_enable 0
 dg_final_directive_check_num_args
+gcc_parallel_test_enable 1

Reply via email to