Skip to content

"test -e" in testsuite doesn't work with Solaris /bin/sh

The testsuite/mk/boilerplate.mk contains stuff like:

$(eval $(call canonicaliseExecutable,TEST_HC))
ifeq "$(shell test -e '$(TEST_HC)' && echo exists)" ""
$(error Cannot find ghc: $(TEST_HC))
endif

On Solaris, the /bin/sh test builtin does not support the -e flag. It does support both -f and -x, meaning regular and executable file respectively. I think we probably mean -x in this case anyway. With that fix the testsuite seems to run ok.

Looks like we already use test -x elsewhere in testsuite/mk/boilerplate.mk so we can assume that it does work with the shell of other platforms.

Trac metadata
Trac field Value
Version 6.12.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Test Suite
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information