Start the server when testing and close after finished.
This commit is contained in:
parent
c427beca1c
commit
85eb4556e5
1 changed files with 5 additions and 3 deletions
8
Makefile
8
Makefile
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue