[PATCH] D82164: [flang] Port test_any.sh tests to FileCheck: Hand port tests which use regexes

Richard Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 02:39:19 PDT 2020


richard.barton.arm created this revision.
richard.barton.arm added a reviewer: tskeith.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The regex syntax used by test_any.sh's FileCheck is sometimes incompatible with
real FileCheck.

Hand port these tests to use FileCheck and it's regex format.

Also remove FIXME from label01 that no longer applies and define a macro
to enable all tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82164

Files:
  flang/test/Semantics/doconcurrent04.f90
  flang/test/Semantics/label01.F90
  flang/test/Semantics/label11.f90


Index: flang/test/Semantics/label11.f90
===================================================================
--- flang/test/Semantics/label11.f90
+++ flang/test/Semantics/label11.f90
@@ -1,12 +1,11 @@
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
 ! CHECK: BLOCK DATA subprogram name mismatch
 ! CHECK: should be
 ! CHECK: FUNCTION name mismatch
 ! CHECK: SUBROUTINE name mismatch
 ! CHECK: PROGRAM name mismatch
 ! CHECK: SUBMODULE name mismatch
-! CHECK: INTERFACE generic-name .t7. mismatch
+! CHECK: INTERFACE generic-name (t7) mismatch
 ! CHECK: mismatched INTERFACE
 ! CHECK: derived type definition name mismatch
 ! CHECK: MODULE PROCEDURE name mismatch
Index: flang/test/Semantics/label01.F90
===================================================================
--- flang/test/Semantics/label01.F90
+++ flang/test/Semantics/label01.F90
@@ -1,9 +1,5 @@
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s -o /dev/null 2>&1 | grep -v 'procedure conflicts' | ${FileCheck} %s
-! CHECK-NOT: error:[[:space:]]
-
-! FIXME: filter out the array/function syntax issues (procedure conflicts)
-! for now...
+! RUN: %f18 -DARCHAIC_FORTRAN -funparse-with-symbols %s 2>&1 | FileCheck %s
+! CHECK-NOT: error:{{[[:space:]]}}
 
 ! these are the conformance tests
 ! define STRICT_F18 to eliminate tests of features not in F18
Index: flang/test/Semantics/doconcurrent04.f90
===================================================================
--- flang/test/Semantics/doconcurrent04.f90
+++ flang/test/Semantics/doconcurrent04.f90
@@ -1,7 +1,6 @@
-! RUN: %S/test_any.sh %s %t %f18
 ! C1122 The index-name shall be a named scalar variable of type integer.
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
-! CHECK: Must have INTEGER type, but is REAL\\(4\\)
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
+! CHECK: Must have INTEGER type, but is REAL(4)
 
 subroutine do_concurrent_test1(n)
   implicit none


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82164.271964.patch
Type: text/x-patch
Size: 2066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200619/07f79404/attachment-0001.bin>


More information about the llvm-commits mailing list