Commit 1edd7529 authored by Kristian Lyngstøl's avatar Kristian Lyngstøl

Add a varnishtests/Makefile.kristian for parallel tests

Usage: cd bin/varnishtest/; make -f Makefile.kristian -j20



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5107 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent b3bc68af
# Usage: make -f Makefile.kristian -j20 (for 20 parallel jobs)
SHELL = /bin/sh
# Complete all tests even if one fails
MAKEFLAGS = -k
objs=$(addsuffix .done,$(basename $(notdir $(wildcard tests/*vtc))))
check: $(objs)
@echo "==================="
@echo "All tests succeeded"
@echo "==================="
# Capture output of varnishtest for a specific test. Only output it if the
# test failed.
#
# XXX: 'echo' in dash (often used as /bin/sh) does not support -E and
# always interpret \n's(as in a \ and a n, not a real line break),
# thus the /bin/echo -E crud to avoid double line breaks on
# "body | <foo>\n".
#
# XXX: Even if this doesn't create a real file, it's not a phony target per
# se, as it has to fire every time you run 'make check'.
%.done: tests/%.vtc
@if output=$$(./varnishtest $< 2>&1 ); then\
echo "$< OK";\
else\
ret=$$?;\
/bin/echo -E 1>&2 "$$output";\
echo 1>&2 $< "FAILED ($$ret)\n";\
exit $$ret;\
fi;
.PHONY: check
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment