apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.18k stars 1.29k forks source link

Fix bindingTestScript.sh shebang and use /usr/bin/env to find bash #11441

Closed sepeth closed 3 weeks ago

sepeth commented 4 weeks ago

This change allows people to run this script on macOS, which has quite an old version of bash at /bin/bash. Without it, I see the following error:

build/bindingtester/localClusterStart.sh: line 209: syntax error near unexpected token `>'
build/bindingtester/localClusterStart.sh: line 209: `  elif "${BINDIR}/fdbcli" -C "${FDBCONF}" --exec "kill; kill ${FDBCLUSTERTEXT}; sleep 3" --timeout 120 &>> "${LOGDIR}/fdbcli-kill.log"'

Also, note that the old shebang in bindingTestScript.sh was also missing the ! character.

localClusterStart.sh didn't need to be changed since it is directly sourced by bindingTestScript.sh, but there's no harm to correct it, and it could perhaps become useful if one tries to use it directly.

Code-Reviewer Section

The general pull request guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

xis19 commented 4 weeks ago

Thanks for fixing this issue!

Meanwhile we have bindingtest2 which is implemented in Python3 and might be less error prone.