github.com/ava-labs/subnet-evm@v0.6.4/scripts/build_test.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -o errexit
     4  set -o nounset
     5  set -o pipefail
     6  # TODO(marun) Ensure the working directory is the repository root or a non-canonical set of tests may be executed
     7  
     8  # Root directory
     9  SUBNET_EVM_PATH=$(
    10      cd "$(dirname "${BASH_SOURCE[0]}")"
    11      cd .. && pwd
    12  )
    13  
    14  # Load the versions
    15  source "$SUBNET_EVM_PATH"/scripts/versions.sh
    16  
    17  # Load the constants
    18  source "$SUBNET_EVM_PATH"/scripts/constants.sh
    19  
    20  # We pass in the arguments to this script directly to enable easily passing parameters such as enabling race detection,
    21  # parallelism, and test coverage.
    22  # DO NOT RUN tests from the top level "tests" directory since they are run by ginkgo
    23  # shellcheck disable=SC2046
    24  go test -shuffle=on -race -timeout="${TIMEOUT:-600s}" -coverprofile=coverage.out -covermode=atomic  "$@" $(go list ./... | grep -v github.com/ava-labs/subnet-evm/tests)