diff mbox series

[committed] d: Don't run all permutations for fail_compilation tests.

Message ID 20200826081424.450927-1-ibuclaw@gdcproject.org
State New
Headers show
Series [committed] d: Don't run all permutations for fail_compilation tests. | expand

Commit Message

Iain Buclaw Aug. 26, 2020, 8:14 a.m. UTC
Hi,

This patch turns off permutations for fail_compilatation tests if the
test file did not request its own options.

Fail compilation tests only check for language errors from the front-end, all
default option switches do nothing to alter the error.

Regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline.

Regards
Iain

---
gcc/testsuite/ChangeLog:

	* lib/gdc-utils.exp (gdc-convert-test): Clear PERMUTE_ARGS for
	fail_compilation tests if not set by test file.
---
 gcc/testsuite/lib/gdc-utils.exp | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/gcc/testsuite/lib/gdc-utils.exp b/gcc/testsuite/lib/gdc-utils.exp
index 0e4f57c756d..37c1620f307 100644
--- a/gcc/testsuite/lib/gdc-utils.exp
+++ b/gcc/testsuite/lib/gdc-utils.exp
@@ -370,6 +370,11 @@  proc gdc-convert-test { base test } {
 	}
 
 	fail_compilation {
+	    # Fail compilation tests only check for language errors from the
+	    # front-end.  No need to run all permutations of the default DFLAGS.
+	    if { $PERMUTE_ARGS == $DEFAULT_DFLAGS } {
+		set PERMUTE_ARGS ""
+	    }
 	    puts $fdout "// { dg-final { output-exists-not } }"
 	}
     }