diff options
author | Jan Lehnardt <jan@apache.org> | 2015-06-22 22:01:50 +0200 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2015-06-24 23:06:59 +0200 |
commit | 4fee5877a474664a1bcceda05cc4cef1cbe88a9e (patch) | |
tree | e4425154a81bbb31608242f5fafc717882ba6cd6 | |
parent | 4dc3eafed5bcfa7cce91283e83d458ccfd7c1e8a (diff) | |
download | couchdb-4fee5877a474664a1bcceda05cc4cef1cbe88a9e.tar.gz |
check build scripts for bashisms
-rwxr-xr-x | test/build/test-configure.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test/build/test-configure.sh b/test/build/test-configure.sh index ae7565c7f..4a209889f 100755 --- a/test/build/test-configure.sh +++ b/test/build/test-configure.sh @@ -13,6 +13,8 @@ # requires shunit2 to be in $PATH # http://shunit2.googlecode.com/ +# uses `checkbashisms` if in $PATH + SHUNIT2=`which shunit2` @@ -25,7 +27,29 @@ if [ -z "$SHUNIT2" -o ! -x "$SHUNIT2" ]; then exit 1 fi -CMD="./configure2 --test " +CHECKBASHISMS=`which checkbashisms` + +if [ -n "$CHECKBASHISMS" -a -x "$CHECKBASHISMS" ]; then + echo "Checking for bash-isms" + + echo " in ./configure" + `$CHECKBASHISMS -npfx configure` + if [ $? -ne 0 ]; then + echo "./configure includes bashisms, do not release" + fi + echo " done" + + echo " in ./build-aux/couchdb-build-release.sh" + `$CHECKBASHISMS -npfx ./build-aux/couchdb-build-release.sh` + if [ $? -ne 0 ]; then + echo "./build-aux/couchdb-build-release.sh includes bashisms, do not release" + fi + echo " done" +fi + + +# shunit2 tests +CMD="./configure --test " test_defaults() { EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share /usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib /usr/local/var/lib /usr/local/var/log" |