mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
build: remove test.sh wrapper
My assumption is that this used to be in place because of `go` not ignoring the `vendor` directory. However, in 2023 this appears to no longer be an issue, and only adds complexity. While running `go test ./...` works just fine. Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,5 +2,4 @@ bin/
|
||||
dist/
|
||||
Cargo.lock
|
||||
vendor/
|
||||
coverage.txt
|
||||
profile.out
|
||||
|
||||
4
Makefile
4
Makefile
@@ -4,7 +4,9 @@
|
||||
|
||||
PROJECT := github.com/getsops/sops/v3
|
||||
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
GO := GOPROXY=https://proxy.golang.org go
|
||||
GO_TEST_FLAGS ?= -race -coverprofile=profile.out -covermode=atomic
|
||||
|
||||
GITHUB_REPOSITORY ?= github.com/getsops/sops
|
||||
|
||||
@@ -41,7 +43,7 @@ vet:
|
||||
.PHONY: test
|
||||
test: vendor
|
||||
gpg --import pgp/sops_functional_tests_key.asc 2>&1 1>/dev/null || exit 0
|
||||
./test.sh
|
||||
$(GO) test $(GO_TEST_FLAGS) ./...
|
||||
|
||||
showcoverage: test
|
||||
$(GO) tool cover -html=coverage.out
|
||||
|
||||
20
test.sh
20
test.sh
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
failed=0
|
||||
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -race -coverprofile=profile.out -covermode=atomic $d && true
|
||||
rc=$?
|
||||
if [ $rc != 0 ]; then
|
||||
failed=$rc
|
||||
fi
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
|
||||
exit ${failed}
|
||||
Reference in New Issue
Block a user