From d48f344cf1a6e0b479629d7a96c1402b1733106e 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 bfcb0f159a4835cc6a0326ff46de7934e0363aed 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 f74a9e4b35feb8c07d8a70b5a581088a0a59889d 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 16dc57e1e1c28e9d762424e596223a980770e059 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 fe3e68afd99d8ea246be52893730f987e138ec24 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 fcaa94c7453efa0d74e330128c0f5c2cde8f11b3 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 86ec83754e0ee7153ad55091f7b6da448bc529c5 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 7306afe9ab073c424ddca0ddc57950f237948118 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 7a7169791a64190e1002e38bc9c04ad0d5c1ce1f 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 97747ea0f3178f7f5890512d483fdccaa82846b0 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 698fb76b98c46c677abe13fdc93afc6c4f38c39e 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 b27fc108ecd6eead5c97cf6e894bf8d639fff75c 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 10314cef906fd9b73e003be69c2f6b7b3d66570c 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 860c41441b3bcf542b5701ae2257812879ce47b4 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