Run TPM simulator tests

This commit is contained in:
Herman Slatman 2023-03-30 11:39:24 +02:00
parent bf53b394a1
commit 1cc3ad27a5
No known key found for this signature in database
GPG key ID: F4D8A44EA0A75A4F
2 changed files with 12 additions and 3 deletions

View file

@ -23,4 +23,5 @@ jobs:
os-dependencies: "libpcsclite-dev"
run-gitleaks: true
run-codeql: true
make-test: true # run `make test` instead of the default test workflow
secrets: inherit

View file

@ -90,13 +90,21 @@ generate:
#########################################
# Test
#########################################
test:
$Q $(GOFLAGS) gotestsum -- -coverprofile=coverage.out -short -covermode=atomic ./...
test: testdefault testtpmsimulator combinecoverage
testdefault:
$Q $(GOFLAGS) gotestsum -- -coverprofile=defaultcoverage.out -short -covermode=atomic ./...
testtpmsimulator:
$Q CGO_ENALBED=1 gotestsum -- -coverprofile=tpmsimulatorcoverage.out -short -covermode=atomic -tags tpmsimulator ./acme
testcgo:
$Q gotestsum -- -coverprofile=coverage.out -short -covermode=atomic ./...
.PHONY: test testcgo
combinecoverage:
cat defaultcoverage.out tpmsimulatorcoverage.out > coverage.out
.PHONY: test testdefault testtpmsimulator testcgo combinecoverage
integrate: integration