github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/scripts/gotests.sh (about)

     1  #!/bin/bash
     2  
     3  scriptpath=$(realpath $0)
     4  envpath=$(dirname $(dirname $scriptpath))'/build/env.sh'
     5  
     6  for td in */; do
     7  	if [ "$td" == "build/" ]; then
     8  		continue
     9  	fi
    10  	if [ "$td" == "cmd/" ]; then
    11  		continue
    12  	fi
    13  
    14  	gocnt=$(find $td -name '*.go' | wc -l)
    15  	if [ $gocnt -gt 0 ]; then
    16  		echo "Running go test in $td"
    17  		$envpath go test -v ./$td
    18  		echo ''
    19  	fi
    20  done