forked from canonical/secboot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 1.55 KB
/
Copy pathMakefile
File metadata and controls
48 lines (36 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
help:
# Usage:
# make build Build companion tools
# make check Run all tests
# make check-efi-preinstall Run tests of package efi/preinstall
# make check-efi Run tests of package efi
# make list-packages List Go packages
.PHONY: build check check-tpm2-simulator FORCE
FORCE:
# Build command line programs
build:
go build -o test_efi_fde_compat cmd/test_efi_fde_compat/main.go
go build -o run_argon2 cmd/run_argon2/main.go
# Disable optimization and inlining (to facilitate step-by-step debugging)
GCFLAGS = -gcflags "-N -l"
check-tpm2-simulator:
@echo "Checking installed snap: tpm2-simulator-chrisccoulson"
@snap list tpm2-simulator-chrisccoulson > /dev/null
check: check-tpm2-simulator
./run-tests --with-mssim
check-efi-preinstall.bin: FORCE
go test -cover -c -o $@ $(GCFLAGS) ./efi/preinstall -v -ldflags '-X github.com/snapcore/secboot/internal/testenv.testBinary=enabled' -race -p 1
check-efi-preinstall: check-efi-preinstall.bin check-tpm2-simulator
USE_MSSIM=1 ./$< -test.coverprofile=coverage.out -check.v
# You may now view the coverage report by executing:
# go tool cover -func=coverage.out
# or: go tool cover -html=coverage.out
check-efi.bin: FORCE
go test -cover -c -o $@ $(GCFLAGS) ./efi -v -ldflags '-X github.com/snapcore/secboot/internal/testenv.testBinary=enabled' -race -p 1
check-efi: check-efi.bin check-tpm2-simulator
@# cd to efi/. as testdata is expected in .
cd efi && ../$< -test.coverprofile=coverage.out -check.v
fmt:
go fmt ./...
list-packages:
go list ./...