github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/script/acceptancetest (about)

     1  #!/bin/bash
     2  #
     3  # Run acceptance tests.
     4  
     5  # We intentionally don't set '-u' (error on unbound variables) or '-e' (exit on
     6  # first failure) initially since DevStack is not designed to run with these
     7  # flags and things crash and burn *spectacularly* 🔥🔥🔥
     8  set -xo pipefail
     9  
    10  # shellcheck disable=SC1091
    11  source "$(dirname "$0")/stackenv"
    12  
    13  # ...but we can do it after the fact
    14  set -eu
    15  
    16  timeout="60m"
    17  
    18  LOG_DIR=${LOG_DIR:-}
    19  if [[ -z "${LOG_DIR}" ]]; then
    20      echo "LOG_DIR not set, will set a temp directory"
    21      LOG_DIR=/tmp/devstack-logs
    22  fi
    23  mkdir -p "${LOG_DIR}"
    24  
    25  # shellcheck disable=SC2068
    26  go test -v -timeout $timeout -tags "fixtures acceptance" "${PACKAGE:-./internal/acceptance/openstack/...}" $@ |& tee -a "${LOG_DIR}/acceptance_tests.log"