File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -253,9 +253,19 @@ TEST_TARGET = $@
253253
254254TEST = ./sage -t --logfile=$(TEST_LOG ) $(TEST_FLAGS ) --optional=$(TEST_OPTIONAL ) $(TEST_FILES )
255255
256+ test-git-no-uncommitted-changes :
257+ @UNCOMMITTED=$$(git status --porcelain ) ; \
258+ if [ -n " $$ UNCOMMITTED" ]; then \
259+ echo " Error: the git repo has uncommitted changes:" ; \
260+ echo " $$ UNCOMMITTED" ; \
261+ echo ; \
262+ exit 1; \
263+ fi
264+
256265test : all
257266 @echo ' ### make $(TEST_TARGET): Running $(TEST)' >> $(TEST_LOG )
258- $(TEST )
267+ $(TEST ) ; \
268+ $(MAKE ) test-git-no-uncommitted-changes
259269
260270check :
261271 @$(MAKE ) test
@@ -302,7 +312,8 @@ ptestoptionallong:
302312test-nodoc : TEST_OPTIONAL := $(TEST_OPTIONAL ) ,!sagemath_doc_html,!sagemath_doc_pdf
303313test-nodoc : build
304314 @echo ' ### make $(TEST_TARGET): Running $(TEST)' >> $(TEST_LOG )
305- $(TEST )
315+ $(TEST ) ; \
316+ $(MAKE ) test-git-no-uncommitted-changes
306317
307318check-nodoc :
308319 @$(MAKE ) test-nodoc
@@ -387,5 +398,6 @@ list:
387398 misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
388399 test check testoptional testall testlong testoptionallong testallong \
389400 ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
401+ test-git-no-uncommitted-changes \
390402 list \
391403 doc-clean clean sagelib-clean build-clean
You can’t perform that action at this time.
0 commit comments