-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (57 loc) · 2.37 KB
/
Makefile
File metadata and controls
79 lines (57 loc) · 2.37 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
all: go vscode
go: out/protocolc out/backend out/uplink out/sqlrecord
.PHONY: release go vscode all clean
out:
mkdir -p out
FORCE: ;
clean: FORCE
rm -rf out
release: vscode out/uplink out/backend out/sqlrecord
protocol: out/protocolc
./out/protocolc -p fprime -o pkg/fprime/packet.go ./pkg/fprime/fprime.protocol
./out/protocolc -p spp -o pkg/spp/packet.go ./pkg/spp/spp.protocol
out/protocolc: out FORCE
go build ${GO_FLAGS} -o out/protocolc github.com/nasa/hermes/cmd/protocolc
out/fprime-decode: out FORCE
go build ${GO_FLAGS} -o out/fprime-decode github.com/nasa/hermes/cmd/fprime-decode
out/dict: out FORCE
go build ${GO_FLAGS} -o out/dict github.com/nasa/hermes/cmd/dict
out/uplink: out FORCE
go build ${GO_FLAGS} -o out/uplink github.com/nasa/hermes/cmd/uplink
out/backend: out FORCE
go build ${GO_FLAGS} -o out/backend github.com/nasa/hermes/cmd/backend
out/sqlrecord: out FORCE
go build ${GO_FLAGS} -o out/sqlrecord github.com/nasa/hermes/cmd/sqlrecord
out/downlink-pb-to-json: out FORCE
go build ${GO_FLAGS} -o out/downlink-pb-to-json github.com/nasa/hermes/cmd/downlink-pb-to-json
out/hermes-fprime-dictionary: out FORCE
cargo build --release --bin hermes-fprime-dictionary
cp target/release/hermes-fprime-dictionary out/
vscode: out FORCE
yarn build
# Integration testing targets
.PHONY: test-integration test-integration-setup test-integration-teardown test-integration-run build-fprime-cache
# Build F Prime cache image (for nightly builds)
build-fprime-cache:
docker build -f Dockerfile.fprime -t fprime-ref:local .
# Build and start the Docker container for testing
test-integration-setup:
docker compose -f test/docker-compose.yml build
docker compose -f test/docker-compose.yml up -d
@echo "Waiting for services to be ready..."
@sleep 10
# Run integration tests
test-integration-run:
go test -v ./test/... -timeout 5m
# Run integration tests
test-integration-logs:
docker compose -f test/docker-compose.yml logs
# Stop and remove Docker containers
test-integration-teardown:
docker compose -f test/docker-compose.yml down -v
# Run full integration test suite (setup + test + teardown)
test-integration: test-integration-setup
@echo "Running integration tests..."
@$(MAKE) test-integration-run || ($(MAKE) test-integration-logs && $(MAKE) test-integration-teardown && exit 1)
@$(MAKE) test-integration-teardown
@echo "Integration tests completed successfully"