changeset 34418:6faf474f9ce3

build: Merge tests/Makefile into top-level Makefile and test non-recursively. Recursive Make is broken by design, always.
author diego
date Thu, 05 Jan 2012 12:08:36 +0000
parents 1745c2a7a628
children a56707da37cd
files Makefile tests/Makefile tests/faterun.sh
diffstat 3 files changed, 38 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Jan 05 12:06:03 2012 +0000
+++ b/Makefile	Thu Jan 05 12:08:36 2012 +0000
@@ -956,7 +956,7 @@
 
 clean:
 	-$(MAKE) -C ffmpeg $@
-	-$(MAKE) -C tests clean
+	-rm -rf tests/res
 	-rm -f $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~)
 	-rm -f $(call ADD_ALL_EXESUFS,mplayer mencoder)
 
@@ -980,6 +980,35 @@
 
 
 
+###### regression tests #######
+
+BROKEN_SAMPLES =                         \
+    h264-conformance/CABA3_TOSHIBA_E.264 \
+    h264-conformance/CAPA1_TOSHIBA_B.264 \
+    h264-conformance/CI1_FT_B.264        \
+    h264-conformance/FM1_FT_E.264        \
+    pva/PVA_test-partial.pva             \
+
+AUDIO_ONLY_SAMPLES =                                               \
+    aac/% ac3/% amrnb/% amrwb/% atrac1/% atrac3/% bink/binkaudio%  \
+    creative/% dts/% duck/%-audio-only.avi eac3/% gsm/% imc/%      \
+    lossless-audio/% mp3-conformance/% musepack/% nellymoser/%     \
+    qt-surge-suite/% real/ra% sipr/% truespeech/% vorbis/%         \
+    vqf/% w64/% wmapro/% wmavoice/%                                \
+
+ALLSAMPLES_FULLPATH = $(wildcard $(FATE_SAMPLES)/*/*.*)
+ALLSAMPLES          = $(patsubst $(FATE_SAMPLES)/%,%,$(ALLSAMPLES_FULLPATH))
+SAMPLES := $(filter-out $(BROKEN_SAMPLES),$(ALLSAMPLES))
+SAMPLES := $(filter-out $(AUDIO_ONLY_SAMPLES),$(SAMPLES))
+RESULTS  = $(patsubst %,tests/res/%.md5,$(SAMPLES))
+
+fatetest: $(RESULTS)
+
+tests/res/%.md5: mplayer$(EXESUF) $(FATE_SAMPLES)/%
+	@tests/faterun.sh $*
+
+
+
 ###### tests / tools #######
 
 TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
@@ -1119,9 +1148,6 @@
 	-rm -f vidix/dhahelper/*.o vidix/dhahelper/*~ vidix/dhahelper/test
 	-rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp)
 
-fatetest: mplayer$(EXESUF)
-	$(MAKE) -C tests fatetest
-
 
 -include $(DEP_FILES) $(DRIVER_DEP_FILES) $(TESTS_DEP_FILES) $(TOOLS_DEP_FILES) $(DHAHELPER_DEP_FILES)
 
--- a/tests/Makefile	Thu Jan 05 12:06:03 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-include ../config.mak
-
-BROKEN_SAMPLES= \
-    h264-conformance/CABA3_TOSHIBA_E.264 \
-    h264-conformance/CAPA1_TOSHIBA_B.264 \
-    h264-conformance/CI1_FT_B.264 \
-    h264-conformance/FM1_FT_E.264 \
-    pva/PVA_test-partial.pva \
-
-AUDIO_ONLY_SAMPLES = \
-    aac/% ac3/% amrnb/% amrwb/% atrac1/% atrac3/% bink/binkaudio% \
-    creative/% dts/% duck/%-audio-only.avi eac3/% gsm/% imc/% \
-    lossless-audio/% mp3-conformance/% musepack/% nellymoser/% \
-    qt-surge-suite/% real/ra% sipr/% truespeech/% vorbis/% \
-    vqf/% w64/% wmapro/% wmavoice/% \
-
-ALLSAMPLES_FULLPATH=$(wildcard $(FATE_SAMPLES)/*/*.*)
-ALLSAMPLES=$(patsubst $(FATE_SAMPLES)/%,%,$(ALLSAMPLES_FULLPATH))
-SAMPLES:=$(filter-out $(BROKEN_SAMPLES),$(ALLSAMPLES))
-SAMPLES:=$(filter-out $(AUDIO_ONLY_SAMPLES),$(SAMPLES))
-RESULTS=$(patsubst %,res/%.md5,$(SAMPLES))
-
-fatetest: $(RESULTS)
-
-res/%.md5: ../mplayer$(EXESUF) $(FATE_SAMPLES)/%
-	@./faterun.sh $*
-
-clean:
-	rm -rf res
-
-.PHONY: fatetest clean
--- a/tests/faterun.sh	Thu Jan 05 12:06:03 2012 +0000
+++ b/tests/faterun.sh	Thu Jan 05 12:08:36 2012 +0000
@@ -1,15 +1,15 @@
 #!/bin/sh
 i=$1
 echo "running $i"
-mkdir -p res/$(dirname $i)
-touch res/$i.md5
-../mplayer -noconfig all -lavdopts threads=4:bitexact -really-quiet -noconsolecontrols -nosound -benchmark -vo md5sum:outfile=res/$i.md5 $FATE_SAMPLES/$i
-ref_file=ref/$i.md5
+mkdir -p tests/res/$(dirname $i)
+touch tests/res/$i.md5
+./mplayer -noconfig all -lavdopts threads=4:bitexact -really-quiet -noconsolecontrols -nosound -benchmark -vo md5sum:outfile=tests/res/$i.md5 $FATE_SAMPLES/$i
+ref_file=tests/ref/$i.md5
 if ! [ -e $ref_file ] ; then
-  touch ref/empty.md5
-  ref_file=ref/empty.md5
+  touch tests/ref/empty.md5
+  ref_file=tests/ref/empty.md5
 fi
-if ! diff -uw $ref_file res/$i.md5 ; then
-  mv res/$i.md5 res/$i.md5.bad
+if ! diff -uw $ref_file tests/res/$i.md5 ; then
+  mv tests/res/$i.md5 tests/res/$i.md5.bad
   exit 1
 fi