-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (20 loc) · 827 Bytes
/
Makefile
File metadata and controls
24 lines (20 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# The main purpose of this Makefile is to help local development and testing.
#
SOURCE_FILES=api/node_info.go config/config.go data/gather.go main.go metrics/metrics.go
CONFIG=./testdata/config.json
DATADIR=./testdata
DATATYPE=nodeinfo1
compose:
mkdir -p ./testdata/gcs/autoload/v1
mkdir -p ./testdata/var/spool/datatypes ./testdata/var/spool/experiment/nodeinfo1
cp ./api/nodeinfo1.json testdata/var/spool/datatypes/nodeinfo1.json
docker-compose up --abort-on-container-exit
run: nodeinfo
rm -rf $(DATADIR)/$(DATATYPE)
./nodeinfo -config $(CONFIG) -datadir $(DATADIR) -once -smoketest -wait 1s; echo; tree $(DATADIR); echo
nodeinfo: $(SOURCE_FILES)
go build -race .
check:
@find $(DATADIR)/$(DATATYPE) -name '*.json' -exec echo -e '\n>>>' {} \; -a -exec jq . {} \; | \
sed -e 's/./.../80' -e 's/\.\.\..*/.../'