1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-go-iptables

Клонировать/Скачать
test 640
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Casey Callendrello Отправлено 24.10.2023 15:10 89558ab
#!/usr/bin/env bash
#
# Run all go-iptables tests
# ./test
# ./test -v
#
# Run tests for one package
# PKG=./unit ./test
# PKG=ssh ./test
#
set -e
# Invoke ./cover for HTML output
COVER=${COVER:-"-cover"}
echo "Checking gofmt..."
fmtRes=$(gofmt -l -s .)
if [ -n "${fmtRes}" ]; then
echo -e "gofmt checking failed:\n${fmtRes}"
exit 255
fi
echo "Running tests..."
bin=$(mktemp)
go test -c -o ${bin} ${COVER} ./iptables/...
if [[ -z "$SUDO_PERMITTED" ]]; then
echo "Test aborted for safety reasons. Please set the SUDO_PERMITTED variable."
exit 1
fi
sudo -E bash -c "${bin} $@ ./iptables/..."
echo "Success"
rm "${bin}"

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-go-iptables.git
git@api.gitlife.ru:oschina-mirror/mirrors-go-iptables.git
oschina-mirror
mirrors-go-iptables
mirrors-go-iptables
main