feat: Add make test-status for quick test overview without re-running

- Add test-status make target for fast test status checking
- Shows test file count, cache status, and recent failures
- References detailed test_status_report.md for comprehensive analysis
- Uses pytest cache and filesystem info for speed
- Includes helpful commands for detailed status checking

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-23 03:16:50 +02:00
parent 03ee6463e9
commit 696ab68c82
2 changed files with 136 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
# MarkiTect - Advanced Markdown Engine
# Makefile for common development tasks
.PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry list-issues show-issue list-open-issues test-from-issue tdd-start tdd-add-test tdd-finish tdd-status
.PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry list-issues show-issue list-open-issues test-from-issue tdd-start tdd-add-test tdd-finish tdd-status test-status
# Default target
help:
@@ -19,6 +19,7 @@ help:
@echo ""
@echo "Development:"
@echo " test - Run all tests"
@echo " test-status - Show test status summary without re-running"
@echo " build - Build the package"
@echo " lint - Run code linting"
@echo " format - Format code"
@@ -286,3 +287,43 @@ tdd-status: $(VENV)/bin/activate
# Complete issue work (move tests to main and cleanup)
tdd-finish: $(VENV)/bin/activate
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py finish-issue
# Show test status summary without re-running tests
test-status: $(VENV)/bin/activate
@echo "📊 MarkiTect Test Status Summary"
@echo "==============================="
@echo ""
@echo "📄 Test Files:"
@find tests/ -name "test_*.py" -exec basename {} \; | sort | sed 's/^/ 📝 /'
@echo ""
@echo "📊 Quick Stats:"
@echo -n " Total test files: "
@find tests/ -name "test_*.py" | wc -l
@echo ""
@if [ -f ".pytest_cache/CACHEDIR.TAG" ]; then \
echo "💾 Last Test Results (cached):"; \
if [ -f ".pytest_cache/v/cache/lastfailed" ]; then \
echo " ❌ Recent failures detected"; \
echo -n " Failed tests: "; \
cat .pytest_cache/v/cache/lastfailed | jq -r 'keys[]' 2>/dev/null | wc -l || echo "Unknown"; \
else \
echo " ✅ No recent failures in cache"; \
fi; \
echo " 📁 Cache: .pytest_cache/ ($$(du -sh .pytest_cache/ 2>/dev/null | cut -f1 || echo 'Unknown size'))"; \
if [ -f ".pytest_cache/README.md" ]; then \
echo " 📅 Last run: $$(stat -c %y .pytest_cache/README.md 2>/dev/null | cut -d. -f1 || echo 'Unknown')"; \
fi; \
else \
echo "❓ No test cache found - run 'make test' to generate results"; \
fi
@echo ""
@echo "🔍 For detailed status:"
@echo " make test # Run all tests with full output"
@echo " make test 2>&1 | grep -E 'PASSED|FAILED' # Show only results"
@echo ""
@if [ -f "test_status_report.md" ]; then \
echo "📋 Full Status Report: test_status_report.md"; \
echo " Last updated: $$(stat -c %y test_status_report.md 2>/dev/null || echo 'Unknown')"; \
else \
echo "💡 Generate detailed report with test run data"; \
fi