1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Files
apache/modules/core/test/Makefile
Fabien Coelho cecc389cfd Add "mod_macro" as a standard module, compiled in with "most".
This module was created in 1998 and has been distributed independently
ever since. It is hereby donated to the Apache Software Foundation.

There are quite a few comments in the source code to explain how it works,
as well as extensive non regression tests.

Some utilities about array processing could be moved to "core.c".
However, I finally decided against for now so that it stays as an external
and independent module, and thus may be backported with minimal impact
on the source tree.

Details of the addition:

* modules/core/mod_macro.c: module source code
* modules/core/test: non regression tests
  modules/core/test/conf/: configuration files
  modules/core/test/ref/: expected results
* docs/manual/mod/mod_macro.xml: English documentation
* docs/manual/mod/mod_macro.xml.fr: French documentation



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1435811 13f79535-47bb-0310-9956-ffa450edef68
2013-01-20 10:07:44 +00:00

70 lines
1.3 KiB
Makefile
Executable File

#
# $Id$
#
# mod_macro non regression tests
# where is apache
APA.dir = /tmp/apache
# apache executable with mod macro loaded
HTTPD = \
$(APA.dir)/bin/httpd \
-C 'LoadModule macro_module modules/mod_macro.so' \
-C "Define PWD $$PWD/conf"
# default target
.PHONY: default
default: clean
# run all non regression tests
.PHONY: check
check: check-out
# result directory
OUT = out
out:
mkdir $@
# test cases & results
F.conf = $(wildcard conf/test*.conf)
F.out = $(F.conf:conf/%.conf=$(OUT)/%.out)
# run all tests
.PHONY: run-test
run-test: $(F.out)
# generate & compare in a separate directory
.PHONY: check-out
check-out: out
$(RM) out/*.out
$(MAKE) OUT=out run-test
diff -r out/ ref/
# generate & compare in the same directory
.PHONY: check-ref
check-ref:
$(RM) ref/*.out
$(MAKE) OUT=ref run-test
svn diff ref/
# run one test case
# filter output so that it is portable
# use '|' sed separator because $PWD will contain plenty '/'
$(OUT)/%.out: conf/%.conf
{ \
echo "# testing with $<" ; \
$(HTTPD) -f $$PWD/$< 2>&1 ; \
echo "# exit: $$?" ; \
} > $@.tmp ; \
sed -e "s|$$PWD|.|g" \
-e "s|^\[[\.a-zA-Z0-9 :]*\] ||" \
-e "s|\[pid [0-9]*:tid [0-9]*] ||" \
$@.tmp > $@ ; \
$(RM) $@.tmp
# cleanup
.PHONY: clean
clean:
$(RM) *~
$(RM) -r out