lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 5ba83b1bd7b6a2193bb197952c18bbca99bc89db
parent d4692b418f91e9db64e1feb8fce62b74ab4c5a95
Author: Sean Enck <sean@ttypty.com>
Date:   Sun, 19 Feb 2023 07:08:53 -0500

cleanup testing area

Diffstat:
MMakefile | 13+++----------
Ascripts/testing/Makefile | 10++++++++++
Rscripts/check.go -> scripts/testing/check.go | 0
Rscripts/tests.expected.log -> scripts/testing/expected.log | 0
Rscripts/hooks/all.sh -> scripts/testing/hooks/all.sh | 0
Rscripts/hooks/test.sh -> scripts/testing/hooks/test.sh | 0
Rscripts/version -> scripts/version/configure | 0
7 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,26 +1,19 @@ BUILD := bin/ TARGET := $(BUILD)lb -ACTUAL := $(BUILD)actual.log -DATE := $(date +%Y-%m-%d) -RUNS := -keyfile=true -keyfile=false all: $(TARGET) build: $(TARGET) $(TARGET): cmd/main.go internal/**/*.go go.* internal/cli/completions* - ./scripts/version cmd/vers.txt + ./scripts/version/configure cmd/vers.txt go build $(GOFLAGS) -o $@ cmd/main.go unittest: go test -v ./... -check: $(TARGET) unittest $(RUNS) - -$(RUNS): - rm -f $(BUILD)*.kdbx - LB_BUILD=$(TARGET) TEST_DATA=$(BUILD) SCRIPTS=$(PWD)/scripts/ go run scripts/check.go $@ 2>&1 | sed "s#$(PWD)/$(DATA)##g" | sed 's/^[0-9][0-9][0-9][0-9][0-9][0-9]$$/XXXXXX/g' | sed 's/modtime: $(DATE).*/modtime: XXXX-XX-XX/g' > $(ACTUAL) - diff -u $(ACTUAL) scripts/tests.expected.log +check: $(TARGET) unittest + make -C scripts/testing LB_BUILD=$(PWD)/$(TARGET) TEST_DATA=$(PWD)/$(BUILD) SCRIPTS=$(PWD)/scripts/testing/ clean: rm -rf $(BUILD) diff --git a/scripts/testing/Makefile b/scripts/testing/Makefile @@ -0,0 +1,10 @@ +ACTUAL := $(TEST_DATA)actual.log +RUNS := -keyfile=true -keyfile=false +DATE := $(date +%Y-%m-%d) + +all: $(RUNS) + +$(RUNS): + rm -f $(TEST_DATA)*.kdbx + LB_BUILD=$(LB_BUILD) TEST_DATA=$(TEST_DATA) SCRIPTS=$(SCRIPTS) go run check.go $@ 2>&1 | sed "s#$(PWD)/$(DATA)##g" | sed 's/^[0-9][0-9][0-9][0-9][0-9][0-9]$$/XXXXXX/g' | sed 's/modtime: $(DATE).*/modtime: XXXX-XX-XX/g' > $(ACTUAL) + diff -u $(ACTUAL) expected.log diff --git a/scripts/check.go b/scripts/testing/check.go diff --git a/scripts/tests.expected.log b/scripts/testing/expected.log diff --git a/scripts/hooks/all.sh b/scripts/testing/hooks/all.sh diff --git a/scripts/hooks/test.sh b/scripts/testing/hooks/test.sh diff --git a/scripts/version b/scripts/version/configure