github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/integration/RUNLOCAL (about)

     1  #!/bin/bash
     2  
     3  # This script is intended to run, locally, the tests we run at circleci,
     4  # precisely as they are run there.
     5  #
     6  # to do so, it:
     7  # o creates a directory to store local artifacts retrieved from docker
     8  #   see TMP= below
     9  # o runs a the standard test container to retrieve a the qemu, kernel, and bios image
    10  # o runs go test with a default set of tests (./...)
    11  #
    12  # NOTE: if you want more complex behavior, don't make this script more
    13  # complex. Convert it to Go. Complex shell scripts suck.
    14  
    15  # Take a guess: they are likely running it in this directory
    16  UROOT_SOURCE=${UROOT_SOURCE:-${PWD}/..}
    17  export UROOT_SOURCE
    18  
    19  set -e
    20  set -x
    21  
    22  . GET_KERNEL_QEMU
    23  
    24  go test "$@" ./...