mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-18 21:21:10 +02:00
This allows to do `make test TESTPKGS=./internal/app/machined`. Also update Dockerfile slug as https://github.com/moby/buildkit/pull/1081 was merged into master. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
26 lines
349 B
Bash
Executable File
26 lines
349 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
perform_tests() {
|
|
echo "Performing tests on $1"
|
|
go test -v -covermode=atomic -coverprofile=coverage.txt "$1"
|
|
}
|
|
|
|
perform_short_tests() {
|
|
echo "Performing short tests on $1"
|
|
go test -v -short "$1"
|
|
}
|
|
|
|
case $1 in
|
|
--short)
|
|
shift
|
|
perform_short_tests "${1:-./...}"
|
|
;;
|
|
*)
|
|
perform_tests "${1:-./...}"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|