mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-18 12:37:05 +02:00
We run tests in parallel mode (`go test -p 4`), default is to run in parallel in fact. But tests are not isolated, as some of them launch containerd on a fixed file socket (as socket path is hardcoded in Talos), and that might lead to any weirdness when tests try to launch containerd concurrently on the same file socket. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
27 lines
340 B
Bash
Executable File
27 lines
340 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
CGO_ENABLED=1
|
|
|
|
perform_tests() {
|
|
echo "Performing tests"
|
|
go test -v -covermode=atomic -coverprofile=artifacts/coverage.txt -p 1 ./...
|
|
}
|
|
|
|
perform_short_tests() {
|
|
echo "Performing short tests"
|
|
go test -v -short -p 1 ./...
|
|
}
|
|
|
|
case $1 in
|
|
--short)
|
|
perform_short_tests
|
|
;;
|
|
*)
|
|
perform_tests
|
|
;;
|
|
esac
|
|
|
|
exit 0
|