[PATCH] D78550: [Flang][test] Don't set PATH in flang/test/Semantics/common.sh
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 03:12:45 PDT 2020
ro created this revision.
ro added a reviewer: sscalpone.
ro added a project: Flang.
Herald added subscribers: fedor.sergeev, jyknight.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Currently, many `Flang :: Semantics` tests FAIL on Solaris. The failure mode is always the
same:
actual at 67: Name in ALLOCATE statement must be a variable name
expect at 67: ERROR: Name in ALLOCATE statement must be a variable name
It turns out the issue is twofold here:
- The awk script embedded in `flang/test/Semantics/common.sh` uses a string value for `FS`, which isn't supported by traditional awk as documented in the GNU autoconf manual.
- Even though /usr/gnu/bin (with gawk installed as awk) is in my build environment's `PATH`, still /bin/awk is used
Although the proper fix would probably be to avoid the unportability, it's easy to avoid it for now.
`common.sh` above is the only script in the whole tree that for unknown reasons overrides
`PATH` to `/usr/bin:/bin`, unnecessarily creating this mess in the first place. Just
removing that setting easily avoids the issue.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`. Ok for master?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78550
Files:
flang/test/Semantics/common.sh
Index: flang/test/Semantics/common.sh
===================================================================
--- flang/test/Semantics/common.sh
+++ flang/test/Semantics/common.sh
@@ -4,8 +4,6 @@
# to the full path of the single source argument; and $USER_OPTIONS to the
# option list given in the $src file after string "OPTIONS:"
-PATH=/usr/bin:/bin
-
function die {
echo "$(basename $0): $*" >&2
exit 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78550.258941.patch
Type: text/x-patch
Size: 413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200421/5d77fe35/attachment.bin>
More information about the llvm-commits
mailing list