mirror of https://codeberg.org/glenneth/stash.git
58 lines
1.6 KiB
Makefile
58 lines
1.6 KiB
Makefile
.PHONY: test test-paths test-package test-tree test-file-ops test-conflict clean-test
|
|
|
|
# Set up environment
|
|
export GUILE_LOAD_PATH := $(PWD):$(GUILE_LOAD_PATH)
|
|
|
|
# Default target
|
|
test: clean-test
|
|
@echo "Running all tests..."
|
|
@./run-tests.sh
|
|
|
|
# Individual test targets
|
|
test-paths:
|
|
@echo "Running path tests..."
|
|
@guile tests/paths-test.scm
|
|
|
|
test-package:
|
|
@echo "Running package tests..."
|
|
@guile tests/package-test.scm
|
|
|
|
test-tree:
|
|
@echo "Running tree tests..."
|
|
@guile tests/tree-test.scm
|
|
|
|
test-file-ops:
|
|
@echo "Running file operations tests..."
|
|
@guile tests/file-ops-test.scm
|
|
|
|
test-conflict:
|
|
@echo "Running conflict tests..."
|
|
@guile tests/conflict-test.scm
|
|
|
|
# Clean temporary test files
|
|
clean-test:
|
|
@echo "Cleaning test files..."
|
|
@rm -f tests/*.log
|
|
@rm -rf /tmp/stash-test-*
|
|
|
|
# Show test coverage (requires guile-coverage)
|
|
coverage:
|
|
@echo "Generating test coverage report..."
|
|
@GUILE_LOAD_PATH="$(PWD):$$GUILE_LOAD_PATH" \
|
|
guile --coverage tests/run-tests.scm
|
|
@lcov --capture --directory . --output-file coverage.info
|
|
@genhtml coverage.info --output-directory coverage
|
|
|
|
.PHONY: help
|
|
help:
|
|
@echo "Available targets:"
|
|
@echo " test - Run all tests"
|
|
@echo " test-paths - Run path handling tests"
|
|
@echo " test-package - Run package management tests"
|
|
@echo " test-tree - Run tree operation tests"
|
|
@echo " test-file-ops- Run file operation tests"
|
|
@echo " test-conflict- Run conflict resolution tests"
|
|
@echo " clean-test - Clean temporary test files"
|
|
@echo " coverage - Generate test coverage report"
|
|
@echo " help - Show this help message"
|