Start the server when testing and close after finished.

This commit is contained in:
tim.schubert@tu-bs.de 2016-10-30 02:05:06 +02:00
parent c427beca1c
commit 85eb4556e5

View file

@ -4,11 +4,13 @@ all: $(FILE) tests
.PHONY: clean .PHONY: clean
clean: clean:
rm netcalc test/results rm $(FILE) netcalc test/results test/$(FILE).pid
$(FILE): $(FILE).c $(FILE): $(FILE).c
gcc $^ -o $@ gcc $^ -o $@
tests: tests: $(FILE)
./netcalc -c < test/cases > test/results ./$(FILE) & echo $$! > test/$(FILE).pid
./$(FILE) -c < test/cases > test/results
kill `cat test/$(FILE).pid`
diff test/results test/expected diff test/results test/expected