fix: test
This commit is contained in:
parent
f9758daf90
commit
f237484e10
3
Makefile
3
Makefile
@ -36,11 +36,12 @@ runtest:
|
|||||||
@if [ ! -f "$(BUILD_PATH)/test" ]; then \
|
@if [ ! -f "$(BUILD_PATH)/test" ]; then \
|
||||||
$(MAKE) -e test; \
|
$(MAKE) -e test; \
|
||||||
fi
|
fi
|
||||||
@TEST_OUTPUT=$$(cd $(BUILD_PATH) && ./test | head -c 12); \
|
TEST_OUTPUT=$$(cd $(BUILD_PATH) && ./test | head -c 12); \
|
||||||
if [ $$TEST_OUTPUT = $(TEST_EXPECTED) ]; then \
|
if [ $$TEST_OUTPUT = $(TEST_EXPECTED) ]; then \
|
||||||
echo "test succeeded."; \
|
echo "test succeeded."; \
|
||||||
else \
|
else \
|
||||||
echo "test failed, expected:" $(TEST_EXPECTED) "but got:" $$TEST_OUTPUT; \
|
echo "test failed, expected:" $(TEST_EXPECTED) "but got:" $$TEST_OUTPUT; \
|
||||||
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
tidy:
|
tidy:
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user