github.com/k8snetworkplumbingwg/sriov-network-operator@v1.2.1-0.20240408194816-2d2e5a45d453/hack/run-e2e-conformance.sh (about)

     1  #!/bin/bash
     2  set -x
     3  which ginkgo
     4  if [ $? -ne 0 ]; then
     5  # we are moving to a temp folder as in go.mod we have a dependency that is not
     6  # resolved if we are not using google's GOPROXY. That is not the case when building as
     7  # we are using vendored dependencies
     8  	GINKGO_TMP_DIR=$(mktemp -d)
     9  	cd $GINKGO_TMP_DIR
    10  	go mod init tmp
    11  	go install -mod=readonly github.com/onsi/ginkgo/v2/ginkgo@v2.9.5
    12  	rm -rf $GINKGO_TMP_DIR	
    13  	echo "Downloading ginkgo tool"
    14  	cd -
    15  fi
    16  
    17  GOPATH="${GOPATH:-~/go}"
    18  JUNIT_OUTPUT="${JUNIT_OUTPUT:-/tmp/artifacts}"
    19  export PATH=$PATH:$GOPATH/bin
    20  
    21  GOFLAGS=-mod=vendor ginkgo -output-dir=$JUNIT_OUTPUT --junit-report "unit_report.xml" -v "$SUITE" -- -report=$JUNIT_OUTPUT