Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
python_make_test_example/Makefile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
17 lines (11 sloc)
686 Bytes
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
##### used to run all python unittest files (test_*.py) by command 'make' - running it again will not re-do already passed tests - use 'make clean' to clear the passed state and be able to run all again | |
MKDIR := $(shell mkdir -p tmp) | |
SOURCES := $(shell find ./ -maxdepth 1 -type f -name 'test_*.py') | |
OBJS := $(shell find -maxdepth 1 -type f -name 'test_*.py' -printf "tmp/%P_test_output\n" | sort) | |
run_all_py_unittests: ${OBJS} | |
@echo "SUCCESS - ALL TESTS PASSED" | |
tmp/%.py_test_output: %.py | |
@echo "TESTING: $^" | |
@python $^ > $@ 2>&1 || (mv -f $@ $@_failed ; echo "FAILED - SEE DETAILS IN FILE: $@_failed --- dumping it below: " ; cat "$@_failed" ; exit 1) | |
clean: | |
rm -f $(OBJS) | |