blob: f3aca16ebe13dcc084b2b89484f3d4756461332f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (c) 2009-2010 by Aleksey Cheusov
#
# See COPYRIGHT file in the distribution.
############################################################
.PHONY : test all
test: all
@echo 'Testing ${.CURDIR}... ' 1>&2; \
set -e; cd ${.CURDIR}; \
tmp_out=${.OBJDIR}/${.CURDIR:T}.test.out; \
rm -f $$tmp_out; \
${MAKE} ${MAKEFLAGS} test_output > $$tmp_out.tmp; \
mv $$tmp_out.tmp $$tmp_out; \
if test -f ${.CURDIR}/expect.${OPSYS}.out; then \
expect=${.CURDIR}/expect.${OPSYS}.out; \
else \
expect=${.CURDIR}/expect.out; \
fi; \
diff $$expect $$tmp_out && \
echo ' succeeded' 1>&2 || \
{ echo ' FAILED' 1>&2; false; }
CLEANFILES += ${.OBJDIR}/${.CURDIR:T}.test.out
#DISTCLEANFILES+= ${.OBJDIR}/${.CURDIR:T}.test.out.tmp
|