mirror of
https://github.com/safing/portmaster
synced 2025-09-04 03:29:12 +00:00
Improve test suite
This commit is contained in:
parent
6fa3bcb115
commit
7958dfd41d
2 changed files with 26 additions and 1 deletions
|
@ -50,7 +50,7 @@ function build {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build
|
# build
|
||||||
./build main.go
|
./build
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo -e "\n${COL_BOLD}[core] $platform v$version: ${COL_RED}BUILD FAILED.${COL_OFF}"
|
echo -e "\n${COL_BOLD}[core] $platform v$version: ${COL_RED}BUILD FAILED.${COL_OFF}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
25
test
25
test
|
@ -131,6 +131,29 @@ if [[ $testonly -eq 0 ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# build portmaster-core for for all supported platforms
|
||||||
|
echo "building portmaster-core for all platforms"
|
||||||
|
cd ./cmds/portmaster-core
|
||||||
|
run env GOOS=linux GOARCH=amd64 ./build
|
||||||
|
run env GOOS=windows GOARCH=amd64 ./build
|
||||||
|
run env GOOS=darwin GOARCH=amd64 ./build
|
||||||
|
run env GOOS=linux GOARCH=arm64 ./build
|
||||||
|
run env GOOS=windows GOARCH=arm64 ./build
|
||||||
|
run env GOOS=darwin GOARCH=arm64 ./build
|
||||||
|
cd "$baseDir"
|
||||||
|
|
||||||
|
# build portmaster-start for for all supported platforms
|
||||||
|
echo ""
|
||||||
|
echo "building portmaster-start for all platforms"
|
||||||
|
cd ./cmds/portmaster-start
|
||||||
|
run env GOOS=linux GOARCH=amd64 ./build
|
||||||
|
run env GOOS=windows GOARCH=amd64 ./build
|
||||||
|
run env GOOS=darwin GOARCH=amd64 ./build
|
||||||
|
run env GOOS=linux GOARCH=arm64 ./build
|
||||||
|
run env GOOS=windows GOARCH=arm64 ./build
|
||||||
|
run env GOOS=darwin GOARCH=arm64 ./build
|
||||||
|
cd "$baseDir"
|
||||||
|
|
||||||
# target selection
|
# target selection
|
||||||
if [[ "$1" == "" ]]; then
|
if [[ "$1" == "" ]]; then
|
||||||
# get all packages
|
# get all packages
|
||||||
|
@ -138,10 +161,12 @@ if [[ "$1" == "" ]]; then
|
||||||
else
|
else
|
||||||
# single package testing
|
# single package testing
|
||||||
packages=$(go list -e)/$1
|
packages=$(go list -e)/$1
|
||||||
|
echo ""
|
||||||
echo "note: only running tests for package $packages"
|
echo "note: only running tests for package $packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# platform info
|
# platform info
|
||||||
|
echo ""
|
||||||
platformInfo=$(go env GOOS GOARCH)
|
platformInfo=$(go env GOOS GOARCH)
|
||||||
echo "running tests for ${platformInfo//$'\n'/ }:"
|
echo "running tests for ${platformInfo//$'\n'/ }:"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue