github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/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"