github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/containers/ddev-ssh-agent/test/test.sh (about) 1 #!/bin/bash 2 3 # Find the directory of this script 4 DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 5 6 set -o errexit 7 set -o pipefail 8 set -o nounset 9 10 if [ $# != 1 ]; then 11 echo "Usage: $0 <imagespec>" 12 exit 1 13 fi 14 export IMAGE=$1 15 16 export CURRENT_ARCH=$(../get_arch.sh) 17 18 # /usr/local/bin is added for git-bash, where it may not be in the $PATH. 19 export PATH="/usr/local/bin:$PATH" 20 bats test || (echo "bats tests failed for IMAGE=${IMAGE}" && exit 2) 21 printf "Test successful for IMAGE=${IMAGE}\n\n"