github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/bin/test (about) 1 #!/bin/bash 2 3 # Run tests for project packages 4 # 5 # Usage: 6 #> bin/test [packages ...] 7 # 8 # Examples: 9 #> bin/test 10 #> bin/test . 11 #> bin/test ./... 12 #> bin/test ./communication 13 #> bin/test ./communication/... 14 15 source bin/helpers/output.sh 16 17 ARGUMENTS=$@ 18 if [ -z "$ARGUMENTS" ]; then 19 ARGUMENTS=`go list ./... | sed '/e2e/d'` #skip e2e package - integration tests by default 20 fi 21 22 if go test -race -timeout 3m -cover ${ARGUMENTS} ; then 23 print_success "All tests passed." 24 exit 0 25 else 26 print_error "Some tests failed!" 27 exit -1 28 fi