diff --git a/test/0-init-fail-json.sh b/test/0-init-fail-json.sh index 20cad0f..3dc0945 100755 --- a/test/0-init-fail-json.sh +++ b/test/0-init-fail-json.sh @@ -4,7 +4,10 @@ packname="0-init-fail-pack" deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist... -$DUB init -n $packname $deps -f json +if $$DUB init -n $packname $deps -f json 2>/dev/null; then + >&2 echo 'Init with unknown non-existing dependency expected to fail' +fi + function cleanup { rm -rf $packname diff --git a/test/0-init-fail.sh b/test/0-init-fail.sh index e577260..10d4465 100755 --- a/test/0-init-fail.sh +++ b/test/0-init-fail.sh @@ -4,7 +4,9 @@ packname="0-init-fail-pack" deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist... -$DUB init -n $packname $deps +if $DUB init -n $packname $deps 2>/dev/null; then + >&2 echo 'Init with unknown non-existing dependency expected to fail' +fi function cleanup { rm -rf $packname diff --git a/test/issue782-gtkd-pkg-config.sh b/test/issue782-gtkd-pkg-config.sh index 6e9a884..b4053c9 100755 --- a/test/issue782-gtkd-pkg-config.sh +++ b/test/issue782-gtkd-pkg-config.sh @@ -8,16 +8,18 @@ # the ${CURR_DIR-$(pwd)} allows running issue782-gtkd-pkg-config.sh stand-alone from the test directory cd ${CURR_DIR-$(pwd)}/issue782-gtkd-pkg-config rm -rf fake-gtkd/.dub - rm fake-gtkd/libfake-gtkd.so + rm -f fake-gtkd/libfake-gtkd.so rm -rf main/.dub - rm main/fake-gtkd-test + rm -f main/fake-gtkd-test echo ${DUB} cd fake-gtkd && ${DUB} build -v --compiler=${DC} || exit 1 cd ../main # `run` needs to find the fake-gtkd shared library, so set LD_LIBRARY_PATH to where it is - # pkg-config needs to find our .pc file which is in $(pwd)/../fake-gtkd/pkgconfig, so set PKG_CONFIG_PATH accordingly - LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/../fake-gtkd PKG_CONFIG_PATH=$(pwd)/../fake-gtkd/pkgconfig ${DUB} -v run --force --compiler=${DC} || exit 1 + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}${LD_LIBRARY_PATH:+:}$PWD/../fake-gtkd + # pkg-config needs to find our .pc file which is in $PWD/../fake-gtkd/pkgconfig, so set PKG_CONFIG_PATH accordingly + export PKG_CONFIG_PATH=$PWD/../fake-gtkd/pkgconfig + ${DUB} -v run --force --compiler=${DC} || exit 1 cd .. rm -rf fake-gtkd/.dub rm fake-gtkd/libfake-gtkd.so diff --git a/test/issue895-local-configuration.sh b/test/issue895-local-configuration.sh index 2727041..e57ad8b 100755 --- a/test/issue895-local-configuration.sh +++ b/test/issue895-local-configuration.sh @@ -16,7 +16,7 @@ exit 1 fi -if ! ${DUB} describe --single issue103-single-file-package.d 2>&1 | grep -e "Unknown compiler: foo" -c > /dev/null; then +if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -e "Unknown compiler: foo" -c > /dev/null; then rm -r ../etc echo "DUB didn't find the local configuration" exit 1 diff --git a/test/issue990-download-optional-selected.sh b/test/issue990-download-optional-selected.sh index 2335f5b..8b548a3 100755 --- a/test/issue990-download-optional-selected.sh +++ b/test/issue990-download-optional-selected.sh @@ -3,5 +3,5 @@ . $(dirname "${BASH_SOURCE[0]}")/common.sh cd ${CURR_DIR}/issue990-download-optional-selected rm -rf b/.dub -${DUB} remove gitcompatibledubpackage -n --version=* -${DUB} run || exit 1 +${DUB} remove gitcompatibledubpackage -n --version=* 2>/dev/null || true +${DUB} run diff --git a/test/run-unittest.sh b/test/run-unittest.sh index 7a4b4d6..f04e487 100755 --- a/test/run-unittest.sh +++ b/test/run-unittest.sh @@ -63,4 +63,4 @@ fi done -exit $any_errors +exit ${any_errors:-0}