diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:30 +0000 |
commit | 6beeb1b708550be0d4a53b272283e17e5e35fe17 (patch) | |
tree | 1ce8673d4aaa948e5554000101f46536a1e4cc29 /modules/core/test/Makefile | |
parent | Initial commit. (diff) | |
download | apache2-upstream/2.4.57.tar.xz apache2-upstream/2.4.57.zip |
Adding upstream version 2.4.57.upstream/2.4.57
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/core/test/Makefile')
-rw-r--r-- | modules/core/test/Makefile | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/modules/core/test/Makefile b/modules/core/test/Makefile new file mode 100644 index 0000000..bd2a6cb --- /dev/null +++ b/modules/core/test/Makefile @@ -0,0 +1,67 @@ +# +# 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 |