From 85eb4556e5b6ee9db1edceace35d92d26ec0c970 Mon Sep 17 00:00:00 2001 From: "tim.schubert@tu-bs.de" Date: Sun, 30 Oct 2016 02:05:06 +0200 Subject: [PATCH] Start the server when testing and close after finished. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 14602f7..fcfcba1 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,13 @@ all: $(FILE) tests .PHONY: clean clean: - rm netcalc test/results + rm $(FILE) netcalc test/results test/$(FILE).pid $(FILE): $(FILE).c gcc $^ -o $@ -tests: - ./netcalc -c < test/cases > test/results +tests: $(FILE) + ./$(FILE) & echo $$! > test/$(FILE).pid + ./$(FILE) -c < test/cases > test/results + kill `cat test/$(FILE).pid` diff test/results test/expected