Skip to content

Commit

Permalink
non-interactive make test
Browse files Browse the repository at this point in the history
  • Loading branch information
fqjony committed Feb 21, 2025
1 parent b64490c commit 9b1c27b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@ clean:

test: clean
@printf "$(COLOR_BLUE)$(SYM_ARROW) Running tests...$(COLOR_RESET)\n"
@chmod +x src/tests/*.sh
@$(MAKE) run \
INTERACTIVE=true \
VOLUMES="$(PWD)/src/tests:/home/udx/tests $(PWD)/src/examples/simple-config/.config/worker/worker.yaml:/home/udx/.config/worker/worker.yaml $(PWD)/src/examples/simple-service/.config/worker/services.yaml:/home/udx/.config/worker/services.yaml $(PWD)/src/examples/simple-service/index.sh:/home/udx/index.sh" \
COMMAND="/home/udx/tests/main.sh" || exit 1
COMMAND="/home/udx/tests/main.sh"
@printf "$(COLOR_BLUE)$(SYM_ARROW) Following test output...$(COLOR_RESET)\n"
@docker logs -f $(CONTAINER_NAME) & LOGS_PID=$$!; \
docker wait $(CONTAINER_NAME) > /dev/null; EXIT_CODE=$$?; \
kill $$LOGS_PID 2>/dev/null || true; \
exit $$EXIT_CODE
@$(MAKE) clean || exit 1
@printf "$(COLOR_GREEN)$(SYM_SUCCESS) Tests completed successfully$(COLOR_RESET)\n"

Expand Down

0 comments on commit 9b1c27b

Please sign in to comment.