[flang-commits] [flang] 0535fab - [Flang][test] Don't set PATH in flang/test/Semantics/common.sh
Rainer Orth via flang-commits
flang-commits at lists.llvm.org
Tue Apr 21 05:37:38 PDT 2020
Author: Rainer Orth
Date: 2020-04-21T14:32:57+02:00
New Revision: 0535fab2375ef71302bc0cf8e5d2ee3280b81f7d
URL: https://github.com/llvm/llvm-project/commit/0535fab2375ef71302bc0cf8e5d2ee3280b81f7d
DIFF: https://github.com/llvm/llvm-project/commit/0535fab2375ef71302bc0cf8e5d2ee3280b81f7d.diff
LOG: [Flang][test] Don't set PATH in flang/test/Semantics/common.sh
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 work around 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`.
Differential Revision: https://reviews.llvm.org/D78550
Added:
Modified:
flang/test/Semantics/common.sh
Removed:
################################################################################
diff --git a/flang/test/Semantics/common.sh b/flang/test/Semantics/common.sh
index 02ccb32fd5f0..f52c4e6464e1 100644
--- a/flang/test/Semantics/common.sh
+++ b/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
More information about the flang-commits
mailing list