[committed] d: Fix new tests gdc.dg/pr93038.d and gdc.dg/pr93038b.d in r10-7320 fail

Message ID 20200401214442.19831-1-ibuclaw@gdcproject.org
State New
Headers show
Series
  • [committed] d: Fix new tests gdc.dg/pr93038.d and gdc.dg/pr93038b.d in r10-7320 fail
Related show

Commit Message

Jakub Jelinek via Gcc-patches April 1, 2020, 9:44 p.m.
Hi,

This patch adjusts another test in gdc.dg that was reported to be
failing in PR94315.

The scan-file match is likely too strict to always succeed, so instead
have split it up into a set of smaller matches.

Tested on x86_64-linux-gnu and committed to mainline.

Regards
Iain. 
---

gcc/testsuite/ChangeLog:

	PR d/94315
	* gdc.dg/pr93038.d: Split dg-final into multiple tests.
	* gdc.dg/pr93038b.d: Likewise.

---
 gcc/testsuite/gdc.dg/pr93038.d  | 4 +++-
 gcc/testsuite/gdc.dg/pr93038b.d | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.20.1

Patch

diff --git a/gcc/testsuite/gdc.dg/pr93038.d b/gcc/testsuite/gdc.dg/pr93038.d
index 4e09690a473..79d30a85380 100644
--- a/gcc/testsuite/gdc.dg/pr93038.d
+++ b/gcc/testsuite/gdc.dg/pr93038.d
@@ -1,7 +1,9 @@ 
 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93038
 // { dg-options "-J $srcdir/gdc.dg/fileimports -MMD" }
 // { dg-do compile }
-// { dg-final { scan-file pr93038.deps "pr93038.o: \[^\n\]*/pr93038.d \[ \\\\\n\]*\[^\n\]*/fileimports/pr93038.txt" } }
+// { dg-final { scan-file pr93038.deps "(^|\\n)pr93038.o:" } }
+// { dg-final { scan-file pr93038.deps "pr93038.d" } }
+// { dg-final { scan-file pr93038.deps "pr93038.txt" } }
 // { dg-final { file delete pr93038.deps } }
 module pr93038;
 
diff --git a/gcc/testsuite/gdc.dg/pr93038b.d b/gcc/testsuite/gdc.dg/pr93038b.d
index 04177a7e01a..18649b8636a 100644
--- a/gcc/testsuite/gdc.dg/pr93038b.d
+++ b/gcc/testsuite/gdc.dg/pr93038b.d
@@ -1,7 +1,10 @@ 
 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93038
 // { dg-options "-J $srcdir/gdc.dg/fileimports -MMD -MP" }
 // { dg-do compile }
-// { dg-final { scan-file pr93038b.deps "pr93038b.o: \[^\n\]*/pr93038b.d \[ \\\\\n\]*\[^\n\]*/fileimports/pr93038.txt\n\n\[^\n\]*/fileimports/pr93038.txt:" } }
+// { dg-final { scan-file pr93038b.deps "(^|\\n)pr93038b.o:" } }
+// { dg-final { scan-file pr93038b.deps "pr93038b.d" } }
+// { dg-final { scan-file pr93038b.deps "pr93038.txt" } }
+// { dg-final { scan-file pr93038b.deps "(^|\\n)\[^\n\]*pr93038.txt:" } }
 // { dg-final { file delete pr93038b.deps } }
 module pr93038b;