File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -253,9 +253,19 @@ TEST_TARGET = $@
253
253
254
254
TEST = ./sage -t --logfile=$(TEST_LOG ) $(TEST_FLAGS ) --optional=$(TEST_OPTIONAL ) $(TEST_FILES )
255
255
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
+
256
265
test : all
257
266
@echo ' ### make $(TEST_TARGET): Running $(TEST)' >> $(TEST_LOG )
258
- $(TEST )
267
+ $(TEST ) ; \
268
+ $(MAKE ) test-git-no-uncommitted-changes
259
269
260
270
check :
261
271
@$(MAKE ) test
@@ -302,7 +312,8 @@ ptestoptionallong:
302
312
test-nodoc : TEST_OPTIONAL := $(TEST_OPTIONAL ) ,!sagemath_doc_html,!sagemath_doc_pdf
303
313
test-nodoc : build
304
314
@echo ' ### make $(TEST_TARGET): Running $(TEST)' >> $(TEST_LOG )
305
- $(TEST )
315
+ $(TEST ) ; \
316
+ $(MAKE ) test-git-no-uncommitted-changes
306
317
307
318
check-nodoc :
308
319
@$(MAKE ) test-nodoc
@@ -387,5 +398,6 @@ list:
387
398
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
388
399
test check testoptional testall testlong testoptionallong testallong \
389
400
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
401
+ test-git-no-uncommitted-changes \
390
402
list \
391
403
doc-clean clean sagelib-clean build-clean
You can’t perform that action at this time.
0 commit comments