Browse code

Fix fate-lavfi-pixfmts test cross-compilation.

Add the lavfi-showfiltfmts dependency in the Makefile, and correctly
use the $target_exec and $target_path variables for invoking the
lavfi-showfiltfmts tool.

Originally committed as revision 24645 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini authored on 2010/08/01 19:27:04
Showing 2 changed files
... ...
@@ -226,6 +226,9 @@ tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
226 226
 tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
227 227
 	$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
228 228
 
229
+tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
230
+	$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
231
+
229 232
 include $(SRC_PATH_BARE)/tests/fate.mak
230 233
 include $(SRC_PATH_BARE)/tests/fate2.mak
231 234
 
... ...
@@ -248,7 +251,7 @@ FATE = $(FATE_ACODEC)                                                   \
248 248
 $(FATE_ACODEC): $(AREF)
249 249
 $(FATE_VCODEC): $(VREF)
250 250
 $(FATE_LAVF):   $(REFS)
251
-$(FATE_LAVFI):  $(REFS)
251
+$(FATE_LAVFI):  $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
252 252
 $(FATE_SEEK):   fate-codec fate-lavf tests/seek_test$(EXESUF)
253 253
 
254 254
 $(FATE_ACODEC):  CMD = codectest acodec
... ...
@@ -66,15 +66,16 @@ vflip
66 66
 "
67 67
 
68 68
 if [ -n "$do_pixfmts_be" ] || [ -n "$do_pixfmts_le" ]; then
69
+    showfiltfmts="$target_exec $target_path/tools/lavfi-showfiltfmts"
69 70
     # exclude pixel formats which are not supported as input
70 71
     excluded_pix_fmts="$($ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2)"
71 72
 
72
-    scale_out_pix_fmts=$(tools/lavfi-showfiltfmts scale | grep "^OUTPUT" | cut -d: -f2)
73
+    scale_out_pix_fmts=$($showfiltfmts scale | grep "^OUTPUT" | cut -d: -f2)
73 74
     scale_out_pix_fmts=$(get_exclusive_elements "$scale_out_pix_fmts" "$excluded_pix_fmts")
74 75
 
75 76
     for filter_args in $filters_args; do
76 77
         filter=$(echo $filter_args | sed -e 's/\([^=]\+\)=.*/\1/')
77
-        in_pix_fmts=$(tools/lavfi-showfiltfmts $filter | grep "^INPUT" | cut -d: -f2)
78
+        in_pix_fmts=$($showfiltfmts $filter | grep "^INPUT" | cut -d: -f2)
78 79
         pix_fmts=$(get_common_elements "$in_pix_fmts" "$scale_out_pix_fmts")
79 80
 
80 81
         for pix_fmt in $pix_fmts; do