[PATCH] D100301: [flang] Fix a test (use %s instead of $s)

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 05:38:57 PDT 2021


awarzynski created this revision.
awarzynski requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

With the typo ($S instead of %s), the driver was expecting
input from stdin. In such cases, it prints:

  Enter Fortran source
  Use EOF character (^D) to end file

This was piped to FileCheck. Together with the available `CHECK-NOT`
statement, this was sufficient for the test to pass (incorrectly).

This patch makes sure that the provided input file is used instead of
stdin.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100301

Files:
  flang/test/Semantics/call17.f90


Index: flang/test/Semantics/call17.f90
===================================================================
--- flang/test/Semantics/call17.f90
+++ flang/test/Semantics/call17.f90
@@ -1,4 +1,4 @@
-! RUN: %f18 -fsyntax-only $s 2>&1 | FileCheck %s
+! RUN: %f18 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty
 
 ! Regression test: don't emit a bogus error about an invalid specification expression
 ! in the declaration of a binding


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100301.336811.patch
Type: text/x-patch
Size: 433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210412/04e20b06/attachment.bin>


More information about the llvm-commits mailing list