Last active
October 30, 2019 09:54
-
-
Save nilsmagnus/c4638c8a9cb72b1891414755318e568f to your computer and use it in GitHub Desktop.
Makefile for watching changes and runinng nose-test on each change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: default watch-test test | |
WATCH_EXEC=$(if $(shell which inotifywait),"inotifywait","fswatch") | |
WATCH_ARGS=$(if $(shell which inotifywait),"-qre" "close_write" ".","*/*.elm" "-1") | |
default: | |
echo "heisann" | |
test: | |
nosetests test/test_1_parsing.py --stop | |
nosetests test/test_2_evaluating_simple_expressions.py --stop | |
nosetests test/test_3_evaluating_complex_expressions.py --stop | |
nosetests test/test_4_working_with_variables_and_environments.py --stop | |
nosetests test/test_5_adding_functions_to_the_mix.py --stop | |
nosetests test/test_6_working_with_lists.py --stop | |
nosetests test/test_7_using_the_language.py --stop | |
nosetests test/test_8_final_touches.py --stop | |
watch: default | |
$(if $(shell which $(WATCH_EXEC)),,echo "No file-watcher found, cannot enter watch-loop"; exit 1) | |
date | |
while true ; do \ | |
$(WATCH_EXEC) $(WATCH_ARGS) ; \ | |
date ; \ | |
make test; \ | |
sleep 1; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment