-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
41 lines (32 loc) · 1.51 KB
/
Makefile
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
TIMEOUT = 30
TESTDATA = "testdata"
get:
@go get ./...
fake-get:
@cp -r vendor/github.com/* $$GOPATH/src/github.com/
build:
@go build
build-testdata:
@for FILE in $(TESTDATA)/eventTypes/*.go $(TESTDATA)/rules/*.go; do \
go build -buildmode=plugin -o $${FILE%.go}.so $${FILE} ;\
done
check test tests: build-testdata
@go test -short -timeout $(TIMEOUT)s ./...
rm *.db
integration: get build-testdata
cd testdata/statefulIntegrationTests/s2s_rules && go get || true
go build -buildmode=plugin -o testdata/statefulIntegrationTests/s2s_rules/cloudTrail_s2s_join.so testdata/statefulIntegrationTests/s2s_rules/cloudTrail_s2s_join.go
go build -buildmode=plugin -o testdata/statefulIntegrationTests/agg_rules/cloudTrail_agg.so testdata/statefulIntegrationTests/agg_rules/cloudTrail_agg.go
go build -buildmode=plugin -o testdata/statefulIntegrationTests/eventTypes/cloudTrail.so testdata/statefulIntegrationTests/eventTypes/cloudTrail.go
go test -timeout 30s -tags=integration
rm *.db
docker-integration:
docker-compose up --build -d
docker-compose run gofish make integration
docker-compose down
build-certstream-example:
cd examples/certstream/rules && go get || true
go build -buildmode=plugin -o examples/certstream/rules/domain_cert_issued.so examples/certstream/rules/domain_cert_issued.go
go build -buildmode=plugin -o examples/certstream/eventTypes/cert_stream.so examples/certstream/eventTypes/cert_stream.go
certstream-example: get build build-certstream-example
./go-fish -config examples/certstream/config.json