Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,19 @@ TEST_TARGET = $@

TEST = ./sage -t --logfile=$(TEST_LOG) $(TEST_FLAGS) --optional=$(TEST_OPTIONAL) $(TEST_FILES)

test-git-no-uncommitted-changes:
@UNCOMMITTED=$$(git status --porcelain); \
if [ -n "$$UNCOMMITTED" ]; then \
echo "Error: the git repo has uncommitted changes:"; \
echo "$$UNCOMMITTED"; \
echo; \
exit 1; \
fi

test: all
@echo '### make $(TEST_TARGET): Running $(TEST)' >> $(TEST_LOG)
$(TEST)
$(TEST); \
$(MAKE) test-git-no-uncommitted-changes

check:
@$(MAKE) test
Expand Down Expand Up @@ -302,7 +312,8 @@ ptestoptionallong:
test-nodoc: TEST_OPTIONAL := $(TEST_OPTIONAL),!sagemath_doc_html,!sagemath_doc_pdf
test-nodoc: build
@echo '### make $(TEST_TARGET): Running $(TEST)' >> $(TEST_LOG)
$(TEST)
$(TEST); \
$(MAKE) test-git-no-uncommitted-changes

check-nodoc:
@$(MAKE) test-nodoc
Expand Down Expand Up @@ -387,5 +398,6 @@ list:
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
test-git-no-uncommitted-changes \
list \
doc-clean clean sagelib-clean build-clean
Loading