.PHONY: test speedtest alltest test: $(TEST) exec # targets with long runtime speedtest: $(SPEEDTEST) alltest: test speedtest test_%: tmp/.passed.test_% @echo "=== $@ passed ===" tmp/%/.test.init_dir: @mkdir -p $(shell dirname $@) @rm $(shell dirname $@)/{*,.test*} 2>/dev/null || true @date > $@ .SECONDEXPANSION: tmp/.passed.test_%: DIR=tmp/$(shell basename $<) tmp/.passed.test_%: bin/test_% tmp/test_%/.test.init_dir @echo "running $(DIR)" @(cd "$(DIR)" && ../../$<) || (if [ -z "$$KEEPTEST" ]; then rm -r "$(DIR)"; fi; false) @rm -r "$(DIR)" @date > $@ # TODO: bootstrap has to wait for dir creation (yes, this is a race # cond right now - good luck) tmp/.passed.test_sim_loop: tmp/test_sim_loop/.bootstrap tmp/.passed.test_filter: tmp/test_filter/.topology