# ExCALIBR Makefile
# Run from /var/www/html/ExCALIBR/
#
# Usage:
# make test — run all tests
# make test-security — run security tests only
# make test-backend — run all backend tests
# make restart — restart the API service
# make logs — tail live API logs
# make status — show API service status
CONDA_ENV = excalibr310
PYTHON = $(HOME)/.miniconda3/envs/$(CONDA_ENV)/bin/python
PYTEST = $(HOME)/.miniconda3/envs/$(CONDA_ENV)/bin/pytest
PYTEST_FLAGS = -v --tb=short
.PHONY: test test-security test-backend restart logs status
# ── Testing ───────────────────────────────────────────────────────────────────
test:
$(PYTEST) $(PYTEST_FLAGS) tests/backend/test_security.py tests/backend/test_api.py
cd ExCALIBR-web && npm run test
test-backend:
$(PYTEST) $(PYTEST_FLAGS) tests/backend/
test-security:
$(PYTEST) $(PYTEST_FLAGS) tests/backend/test_security.py
test-frontend:
cd ExCALIBR-web && nvm use 16 && npm run test
test-pipeline:
$(PYTEST) $(PYTEST_FLAGS) tests/backend/test_pipeline.py
# ── Service management ────────────────────────────────────────────────────────
restart:
sudo systemctl restart excalibr-api
logs:
sudo journalctl -u excalibr-api -f
status:
sudo systemctl status excalibr-api