From e6f714a696c61a48bc249eafb4bb55bd8ca38983 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Aug 2021 08:59:57 +0300 Subject: individual makefile targets for each command --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6d85347..2aa5674 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,19 @@ GO ?= go all: test build -build: +build: dserver dcat dgrep dmap dtail +dserver: ifndef USE_ACL ${GO} build -o dserver ./cmd/dserver/main.go else ${GO} build -tags linuxacl -o dserver ./cmd/dserver/main.go endif +dcat: ${GO} build -o dcat ./cmd/dcat/main.go +dgrep: ${GO} build -o dgrep ./cmd/dgrep/main.go +dmap: ${GO} build -o dmap ./cmd/dmap/main.go +dtail: ${GO} build -o dtail ./cmd/dtail/main.go install: ifndef USE_ACL -- cgit v1.2.3 From 314a542b3c7a4f2bf082389e1233cf257730f857 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 5 Sep 2021 15:51:26 +0300 Subject: finalize new default color schema --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2aa5674..b05e9aa 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GO ?= go -all: test build +all: clean test build build: dserver dcat dgrep dmap dtail dserver: ifndef USE_ACL -- cgit v1.2.3 From 9d80c6c108d0f77eb6ab86684e2eb7f3d0f31c79 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 7 Sep 2021 10:01:32 +0300 Subject: Produce MAPREDUCE lines, can aggregate these via default log format --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b05e9aa..103e2c4 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ vet: echo ${GO} vet $$dir; \ ${GO} vet $$dir; \ done + grep -R TODO . lint: ${GO} get golang.org/x/lint/golint find . -type d | while read dir; do \ -- cgit v1.2.3 From 4bc9e30f9742c58bdb39adfcc5aa2dc55ecb86f3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 8 Sep 2021 19:10:50 +0300 Subject: mapreduce tables are in colors now too --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 103e2c4..2109e56 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GO ?= go -all: clean test build +all: test build build: dserver dcat dgrep dmap dtail dserver: ifndef USE_ACL -- cgit v1.2.3 From 3223be4cf95d0b6828196ac7a84277c18f3f5655 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 19 Sep 2021 13:22:59 +0300 Subject: move args to config package logger package rewrite as dlog --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2109e56..b544388 100644 --- a/Makefile +++ b/Makefile @@ -3,18 +3,18 @@ all: test build build: dserver dcat dgrep dmap dtail dserver: ifndef USE_ACL - ${GO} build -o dserver ./cmd/dserver/main.go + ${GO} build ${GO_FLAGS} -o dserver ./cmd/dserver/main.go else - ${GO} build -tags linuxacl -o dserver ./cmd/dserver/main.go + ${GO} build ${GO_FLAGS} -tags linuxacl -o dserver ./cmd/dserver/main.go endif dcat: - ${GO} build -o dcat ./cmd/dcat/main.go + ${GO} build ${GO_FLAGS} -o dcat ./cmd/dcat/main.go dgrep: - ${GO} build -o dgrep ./cmd/dgrep/main.go + ${GO} build ${GO_FLAGS} -o dgrep ./cmd/dgrep/main.go dmap: - ${GO} build -o dmap ./cmd/dmap/main.go + ${GO} build ${GO_FLAGS} -o dmap ./cmd/dmap/main.go dtail: - ${GO} build -o dtail ./cmd/dtail/main.go + ${GO} build ${GO_FLAGS} -o dtail ./cmd/dtail/main.go install: ifndef USE_ACL ${GO} install ./cmd/dserver/main.go -- cgit v1.2.3 From a4d25626414ee36f937badd13e164aaf271c65d5 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 26 Sep 2021 16:42:47 +0300 Subject: refactor config reader - also looks in additional search paths for config file unless NONE is specified --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b544388..b3c3f38 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ vet: echo ${GO} vet $$dir; \ ${GO} vet $$dir; \ done - grep -R TODO . + grep -R TODO: . lint: ${GO} get golang.org/x/lint/golint find . -type d | while read dir; do \ @@ -43,7 +43,7 @@ lint: done test: ifndef USE_ACL - ${GO} test ./... -v + ${GO} test -race ./... -v else - ${GO} test -tags linuxacl ./... -v + ${GO} test -race -tags linuxacl ./... -v endif -- cgit v1.2.3 From 168087fc3372a0000a19692948bec3555b9cabd0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 2 Oct 2021 13:44:27 +0300 Subject: add dcat test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b3c3f38..ec3e756 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GO ?= go -all: test build +all: build test build: dserver dcat dgrep dmap dtail dserver: ifndef USE_ACL -- cgit v1.2.3 From 47365ee1effe18b2f08ea0a5472b18be60959998 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 6 Oct 2021 10:55:50 +0300 Subject: move health check to separate client binary --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ec3e756..4b50733 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO ?= go all: build test -build: dserver dcat dgrep dmap dtail +build: dserver dcat dgrep dmap dtail dtailhealthcheck dserver: ifndef USE_ACL ${GO} build ${GO_FLAGS} -o dserver ./cmd/dserver/main.go @@ -15,6 +15,8 @@ dmap: ${GO} build ${GO_FLAGS} -o dmap ./cmd/dmap/main.go dtail: ${GO} build ${GO_FLAGS} -o dtail ./cmd/dtail/main.go +dtailhealthcheck: + ${GO} build ${GO_FLAGS} -o dtailhealthcheck ./cmd/dtailhealthcheck/main.go install: ifndef USE_ACL ${GO} install ./cmd/dserver/main.go @@ -25,6 +27,7 @@ endif ${GO} install ./cmd/dgrep/main.go ${GO} install ./cmd/dmap/main.go ${GO} install ./cmd/dtail/main.go + ${GO} install ./cmd/dtailhealthcheck/main.go clean: ls ./cmd/ | while read cmd; do \ test -f $$cmd && rm $$cmd; \ -- cgit v1.2.3 From 7563abe9d5beaa18fa1eab0f65668f5dfcf79052 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 9 Oct 2021 16:44:28 +0300 Subject: add dtail health check unit test. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4b50733..6a0f828 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ lint: golint $$dir; \ done test: + ${GO} clean -testcache ifndef USE_ACL ${GO} test -race ./... -v else -- cgit v1.2.3 From ea1de3044e129d419f4e807f2624a009343a128f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 9 Oct 2021 21:10:29 +0300 Subject: vetting and linting and some code restyling --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a0f828..543b29e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GO ?= go -all: build test +all: build build: dserver dcat dgrep dmap dtail dtailhealthcheck dserver: ifndef USE_ACL @@ -43,7 +43,7 @@ lint: find . -type d | while read dir; do \ echo golint $$dir; \ golint $$dir; \ - done + done | grep -F .go: test: ${GO} clean -testcache ifndef USE_ACL -- cgit v1.2.3 From c20d77a574aacf6e7118d03e85021c119b934a21 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 14 Oct 2021 20:55:35 +0300 Subject: refactor --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 543b29e..45b0bea 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO ?= go all: build -build: dserver dcat dgrep dmap dtail dtailhealthcheck +build: dserver dcat dgrep dmap dtail dtailhealth dserver: ifndef USE_ACL ${GO} build ${GO_FLAGS} -o dserver ./cmd/dserver/main.go @@ -15,8 +15,8 @@ dmap: ${GO} build ${GO_FLAGS} -o dmap ./cmd/dmap/main.go dtail: ${GO} build ${GO_FLAGS} -o dtail ./cmd/dtail/main.go -dtailhealthcheck: - ${GO} build ${GO_FLAGS} -o dtailhealthcheck ./cmd/dtailhealthcheck/main.go +dtailhealth: + ${GO} build ${GO_FLAGS} -o dtailhealth ./cmd/dtailhealth/main.go install: ifndef USE_ACL ${GO} install ./cmd/dserver/main.go @@ -27,7 +27,7 @@ endif ${GO} install ./cmd/dgrep/main.go ${GO} install ./cmd/dmap/main.go ${GO} install ./cmd/dtail/main.go - ${GO} install ./cmd/dtailhealthcheck/main.go + ${GO} install ./cmd/dtailhealth/main.go clean: ls ./cmd/ | while read cmd; do \ test -f $$cmd && rm $$cmd; \ -- cgit v1.2.3 From 424609b4cdc598fcd21cc272b16e64e7e54422de Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 15 Oct 2021 13:06:18 +0300 Subject: Execute test directories individually --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 45b0bea..ae7b811 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,9 @@ lint: test: ${GO} clean -testcache ifndef USE_ACL - ${GO} test -race ./... -v + set -e; find . -name '*_test.go' | while read file; do dirname $$file; done | \ + sort -u | while read dir; do ${GO} test --race -v $$dir || exit 2; done else - ${GO} test -race -tags linuxacl ./... -v + set -e;find . -name '*_test.go' | while read file; do dirname $$file; done | \ + sort -u | while read dir; do ${GO} test --tags linuxacl --race -v $$dir || exit 2; done endif -- cgit v1.2.3 From 2c8beeabd3c1814ede5d1d460cbafb316f21485e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 15 Oct 2021 13:20:48 +0300 Subject: Can configure DTail client not to mess with ~/.ssh/known_hosts via env var - this is useful for running unit and integration tests in jenkins --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ae7b811..6c644f7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ GO ?= go +# This is so that all the tests don't manipulate ~/.ssh/known_hosts +DTAIL_SSH_DONT_ADD_HOSTS_TO_KNOWNHOSTS_FILE = yes all: build build: dserver dcat dgrep dmap dtail dtailhealth dserver: -- cgit v1.2.3 From deeed697f9bb11db70a9e67f30332bab5029ffbf Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 19 Oct 2021 19:01:12 +0300 Subject: Set DTAIL_RUN_INTEGRATIONT_TEST to yes for integration tests --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6c644f7..0e66ac4 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ DTAIL_SSH_DONT_ADD_HOSTS_TO_KNOWNHOSTS_FILE = yes all: build build: dserver dcat dgrep dmap dtail dtailhealth dserver: -ifndef USE_ACL +ifndef DTAIL_USE_ACL ${GO} build ${GO_FLAGS} -o dserver ./cmd/dserver/main.go else ${GO} build ${GO_FLAGS} -tags linuxacl -o dserver ./cmd/dserver/main.go @@ -20,7 +20,7 @@ dtail: dtailhealth: ${GO} build ${GO_FLAGS} -o dtailhealth ./cmd/dtailhealth/main.go install: -ifndef USE_ACL +ifndef DTAIL_USE_ACL ${GO} install ./cmd/dserver/main.go else ${GO} install -tags linuxacl ./cmd/dserver/main.go @@ -48,7 +48,7 @@ lint: done | grep -F .go: test: ${GO} clean -testcache -ifndef USE_ACL +ifndef DTAIL_USE_ACL set -e; find . -name '*_test.go' | while read file; do dirname $$file; done | \ sort -u | while read dir; do ${GO} test --race -v $$dir || exit 2; done else -- cgit v1.2.3 From 150c5901c7ba2fbb994366c7456dfe1937ac7c40 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 24 Oct 2021 13:34:06 +0300 Subject: Fix DCat color test. --- Makefile | 2 -- 1 file changed, 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0e66ac4..a3b299c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ GO ?= go -# This is so that all the tests don't manipulate ~/.ssh/known_hosts -DTAIL_SSH_DONT_ADD_HOSTS_TO_KNOWNHOSTS_FILE = yes all: build build: dserver dcat dgrep dmap dtail dtailhealth dserver: -- cgit v1.2.3 From 7240f83f9f17bf72fbc4d068143003eba000cc75 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 3 Dec 2021 12:29:39 +0000 Subject: fix misuse of unbuffered channel for OS signal handling --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a3b299c..680cef6 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,8 @@ vet: echo ${GO} vet $$dir; \ ${GO} vet $$dir; \ done - grep -R TODO: . + sh -c 'grep -R NEXT: .' + sh -c 'grep -R TODO: .' lint: ${GO} get golang.org/x/lint/golint find . -type d | while read dir; do \ -- cgit v1.2.3