diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-04-20 11:40:40 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-05-13 14:55:56 +0200 |
commit | a6a750c7ef240b72ce01e9653343a0ddf247d196 (patch) | |
tree | 5c472bb92b5264f19b9270b0caf8a8565b071cef | |
parent | 257f00ec1ab06a2a161f535036c6512f3fc8e801 (diff) | |
download | ffmpeg-a6a750c7ef240b72ce01e9653343a0ddf247d196.tar.gz |
tests: Move all test programs to a subdirectory
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | common.mak | 7 | ||||
-rw-r--r-- | libavcodec/Makefile | 2 | ||||
-rw-r--r-- | libavcodec/tests/.gitignore | 6 | ||||
-rw-r--r-- | libavcodec/tests/arm/dct.c (renamed from libavcodec/arm/dct-test.c) | 2 | ||||
-rw-r--r-- | libavcodec/tests/dct.c (renamed from libavcodec/dct-test.c) | 23 | ||||
-rw-r--r-- | libavcodec/tests/fft-fixed.c (renamed from libavcodec/fft-fixed-test.c) | 2 | ||||
-rw-r--r-- | libavcodec/tests/fft.c (renamed from libavcodec/fft-test.c) | 6 | ||||
-rw-r--r-- | libavcodec/tests/golomb.c (renamed from libavcodec/golomb-test.c) | 6 | ||||
-rw-r--r-- | libavcodec/tests/iirfilter.c (renamed from libavcodec/iirfilter-test.c) | 2 | ||||
-rw-r--r-- | libavcodec/tests/ppc/dct.c (renamed from libavcodec/ppc/dct-test.c) | 2 | ||||
-rw-r--r-- | libavcodec/tests/rangecoder.c (renamed from libavcodec/rangecoder-test.c) | 2 | ||||
-rw-r--r-- | libavcodec/tests/x86/dct.c (renamed from libavcodec/x86/dct-test.c) | 6 | ||||
-rw-r--r-- | libavdevice/tests/timefilter.c (renamed from libavdevice/timefilter-test.c) | 2 | ||||
-rw-r--r-- | libavfilter/tests/.gitignore | 1 | ||||
-rw-r--r-- | libavfilter/tests/filtfmts.c (renamed from libavfilter/filtfmts-test.c) | 0 | ||||
-rw-r--r-- | libavformat/tests/.gitignore | 5 | ||||
-rw-r--r-- | libavformat/tests/movenc.c (renamed from libavformat/movenc-test.c) | 2 | ||||
-rw-r--r-- | libavformat/tests/noproxy.c (renamed from libavformat/noproxy-test.c) | 2 | ||||
-rw-r--r-- | libavformat/tests/rtmpdh.c (renamed from libavformat/rtmpdh-test.c) | 2 | ||||
-rw-r--r-- | libavformat/tests/seek.c (renamed from libavformat/seek-test.c) | 1 | ||||
-rw-r--r-- | libavformat/tests/srtp.c (renamed from libavformat/srtp-test.c) | 4 | ||||
-rw-r--r-- | libavformat/tests/url.c (renamed from libavformat/url-test.c) | 2 | ||||
-rw-r--r-- | libavresample/tests/.gitignore | 1 | ||||
-rw-r--r-- | libavresample/tests/avresample.c (renamed from libavresample/avresample-test.c) | 3 | ||||
-rw-r--r-- | libavutil/des.c | 2 | ||||
-rw-r--r-- | libavutil/tests/.gitignore | 21 | ||||
-rw-r--r-- | libavutil/tests/adler32.c (renamed from libavutil/adler32-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/aes.c (renamed from libavutil/aes-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/atomic.c (renamed from libavutil/atomic-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/avstring.c (renamed from libavutil/avstring-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/base64.c (renamed from libavutil/base64-test.c) | 4 | ||||
-rw-r--r-- | libavutil/tests/blowfish.c (renamed from libavutil/blowfish-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/cpu.c (renamed from libavutil/cpu-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/crc.c (renamed from libavutil/crc-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/des.c (renamed from libavutil/des-test.c) | 4 | ||||
-rw-r--r-- | libavutil/tests/eval.c (renamed from libavutil/eval-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/fifo.c (renamed from libavutil/fifo-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/float_dsp.c (renamed from libavutil/float_dsp-test.c) | 12 | ||||
-rw-r--r-- | libavutil/tests/hmac.c (renamed from libavutil/hmac-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/lfg.c (renamed from libavutil/lfg-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/lls.c (renamed from libavutil/lls-test.c) | 6 | ||||
-rw-r--r-- | libavutil/tests/md5.c (renamed from libavutil/md5-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/opt.c (renamed from libavutil/opt-test.c) | 12 | ||||
-rw-r--r-- | libavutil/tests/parseutils.c (renamed from libavutil/parseutils-test.c) | 8 | ||||
-rw-r--r-- | libavutil/tests/sha.c (renamed from libavutil/sha-test.c) | 2 | ||||
-rw-r--r-- | libavutil/tests/tree.c (renamed from libavutil/tree-test.c) | 8 | ||||
-rw-r--r-- | libavutil/tests/xtea.c (renamed from libavutil/xtea-test.c) | 4 | ||||
-rw-r--r-- | library.mak | 7 | ||||
-rw-r--r-- | libswscale/tests/.gitignore | 2 | ||||
-rw-r--r-- | libswscale/tests/colorspace.c (renamed from libswscale/colorspace-test.c) | 5 | ||||
-rw-r--r-- | libswscale/tests/swscale.c (renamed from libswscale/swscale-test.c) | 3 | ||||
-rwxr-xr-x | tests/fate-run.sh | 2 | ||||
-rw-r--r-- | tests/fate/fft.mak | 8 | ||||
-rw-r--r-- | tests/fate/filter-video.mak | 2 | ||||
-rw-r--r-- | tests/fate/libavcodec.mak | 16 | ||||
-rw-r--r-- | tests/fate/libavdevice.mak | 4 | ||||
-rw-r--r-- | tests/fate/libavformat.mak | 20 | ||||
-rw-r--r-- | tests/fate/libavutil.mak | 72 | ||||
-rw-r--r-- | tests/fate/seek.mak | 4 |
60 files changed, 204 insertions, 164 deletions
diff --git a/.gitignore b/.gitignore index a191731ee0..5464bba7e6 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ *.so.* *.swp *.ver -*-test /.config /.version /avconv diff --git a/common.mak b/common.mak index 832025d10c..d62f899dad 100644 --- a/common.mak +++ b/common.mak @@ -15,8 +15,8 @@ LDLIBS = $(FFLIBS:%=%$(BUILDSUF)) FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS) OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) -TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) -TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) +TESTOBJS := $(TESTOBJS:%=$(SUBDIR)tests/%) $(TESTPROGS:%=$(SUBDIR)tests/%.o) +TESTPROGS := $(TESTPROGS:%=$(SUBDIR)tests/%$(EXESUF)) HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o) HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF)) TOOLS += $(TOOLS-yes) @@ -58,8 +58,7 @@ LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a define RULES clean:: - $(RM) $(HOSTPROGS) - $(RM) $(TOOLS) + $(RM) $(HOSTPROGS) $(TESTPROGS) $(TOOLS) endef $(eval $(RULES)) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index d12c52e819..503ffd0eb4 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -813,7 +813,7 @@ HOSTPROGS = aac_tablegen \ CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF) -$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o $(SUBDIR)aandcttab.o +$(SUBDIR)tests/dct$(EXESUF): $(SUBDIR)dctref.o $(SUBDIR)aandcttab.o $(SUBDIR)dv_tablegen$(HOSTEXESUF): $(SUBDIR)dvdata_host.o TRIG_TABLES = cos cos_fixed sin diff --git a/libavcodec/tests/.gitignore b/libavcodec/tests/.gitignore new file mode 100644 index 0000000000..31fa59b018 --- /dev/null +++ b/libavcodec/tests/.gitignore @@ -0,0 +1,6 @@ +/dct +/fft +/fft-fixed +/golomb +/iirfilter +/rangecoder diff --git a/libavcodec/arm/dct-test.c b/libavcodec/tests/arm/dct.c index 70e5c1cb82..d18cb52b60 100644 --- a/libavcodec/arm/dct-test.c +++ b/libavcodec/tests/arm/dct.c @@ -18,7 +18,7 @@ #include "config.h" -#include "idct.h" +#include "libavcodec/arm/idct.h" static const struct algo fdct_tab_arch[] = { { 0 } diff --git a/libavcodec/dct-test.c b/libavcodec/tests/dct.c index 262319e1b4..6c6a4e0d0d 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/tests/dct.c @@ -36,17 +36,18 @@ #include "libavutil/cpu.h" #include "libavutil/common.h" +#include "libavutil/internal.h" #include "libavutil/lfg.h" #include "libavutil/time.h" -#include "dct.h" -#include "idctdsp.h" -#include "simple_idct.h" -#include "xvididct.h" -#include "aandcttab.h" -#include "faandct.h" -#include "faanidct.h" -#include "dctref.h" +#include "libavcodec/aandcttab.h" +#include "libavcodec/dct.h" +#include "libavcodec/dctref.h" +#include "libavcodec/faandct.h" +#include "libavcodec/faanidct.h" +#include "libavcodec/idctdsp.h" +#include "libavcodec/simple_idct.h" +#include "libavcodec/xvididct.h" struct algo { const char *name; @@ -78,11 +79,11 @@ static const struct algo idct_tab[] = { }; #if ARCH_ARM -#include "arm/dct-test.c" +#include "arm/dct.c" #elif ARCH_PPC -#include "ppc/dct-test.c" +#include "ppc/dct.c" #elif ARCH_X86 -#include "x86/dct-test.c" +#include "x86/dct.c" #else static const struct algo fdct_tab_arch[] = { { 0 } }; static const struct algo idct_tab_arch[] = { { 0 } }; diff --git a/libavcodec/fft-fixed-test.c b/libavcodec/tests/fft-fixed.c index d6ea987fa3..6edd810b25 100644 --- a/libavcodec/fft-fixed-test.c +++ b/libavcodec/tests/fft-fixed.c @@ -17,4 +17,4 @@ */ #define FFT_FLOAT 0 -#include "fft-test.c" +#include "fft.c" diff --git a/libavcodec/fft-test.c b/libavcodec/tests/fft.c index 83b5546f08..db1ce9807f 100644 --- a/libavcodec/fft-test.c +++ b/libavcodec/tests/fft.c @@ -39,10 +39,10 @@ #include "libavutil/mathematics.h" #include "libavutil/time.h" -#include "fft.h" +#include "libavcodec/fft.h" #if FFT_FLOAT -#include "dct.h" -#include "rdft.h" +#include "libavcodec/dct.h" +#include "libavcodec/rdft.h" #endif /* reference fft */ diff --git a/libavcodec/golomb-test.c b/libavcodec/tests/golomb.c index e740a20aea..7587402e24 100644 --- a/libavcodec/golomb-test.c +++ b/libavcodec/tests/golomb.c @@ -21,9 +21,9 @@ #include "libavutil/mem.h" -#include "get_bits.h" -#include "golomb.h" -#include "put_bits.h" +#include "libavcodec/get_bits.h" +#include "libavcodec/put_bits.h" +#include "libavcodec/golomb.h" #define COUNT 8191 #define SIZE (COUNT * 4) diff --git a/libavcodec/iirfilter-test.c b/libavcodec/tests/iirfilter.c index 5aa156cb90..a6001a3270 100644 --- a/libavcodec/iirfilter-test.c +++ b/libavcodec/tests/iirfilter.c @@ -22,7 +22,7 @@ #include "libavutil/libm.h" -#include "iirfilter.h" +#include "libavcodec/iirfilter.h" #define FILT_ORDER 4 #define SIZE 1024 diff --git a/libavcodec/ppc/dct-test.c b/libavcodec/tests/ppc/dct.c index 2acbe2aeb0..3d160d33e0 100644 --- a/libavcodec/ppc/dct-test.c +++ b/libavcodec/tests/ppc/dct.c @@ -18,7 +18,7 @@ #include "config.h" -#include "fdct.h" +#include "libavcodec/ppc/fdct.h" static const struct algo fdct_tab_arch[] = { #if HAVE_ALTIVEC && HAVE_BIGENDIAN diff --git a/libavcodec/rangecoder-test.c b/libavcodec/tests/rangecoder.c index f4c76c01f0..26bb589928 100644 --- a/libavcodec/rangecoder-test.c +++ b/libavcodec/tests/rangecoder.c @@ -22,7 +22,7 @@ #include "libavutil/lfg.h" #include "libavutil/log.h" -#include "rangecoder.h" +#include "libavcodec/rangecoder.h" #define SIZE 10240 diff --git a/libavcodec/x86/dct-test.c b/libavcodec/tests/x86/dct.c index 9d4aaf5415..2ddb55510e 100644 --- a/libavcodec/x86/dct-test.c +++ b/libavcodec/tests/x86/dct.c @@ -18,9 +18,9 @@ #include "config.h" -#include "fdct.h" -#include "xvididct.h" -#include "simple_idct.h" +#include "libavcodec/x86/fdct.h" +#include "libavcodec/x86/xvididct.h" +#include "libavcodec/x86/simple_idct.h" static const struct algo fdct_tab_arch[] = { #if HAVE_MMX_INLINE diff --git a/libavdevice/timefilter-test.c b/libavdevice/tests/timefilter.c index 5e93f3c8d3..8c7cba2cac 100644 --- a/libavdevice/timefilter-test.c +++ b/libavdevice/tests/timefilter.c @@ -21,7 +21,7 @@ #include "libavutil/common.h" #include "libavutil/lfg.h" -#include "timefilter.h" +#include "libavdevice/timefilter.h" #define LFG_MAX ((1LL << 32) - 1) diff --git a/libavfilter/tests/.gitignore b/libavfilter/tests/.gitignore new file mode 100644 index 0000000000..a55b3866b3 --- /dev/null +++ b/libavfilter/tests/.gitignore @@ -0,0 +1 @@ +/filtfmts diff --git a/libavfilter/filtfmts-test.c b/libavfilter/tests/filtfmts.c index cc04654222..cc04654222 100644 --- a/libavfilter/filtfmts-test.c +++ b/libavfilter/tests/filtfmts.c diff --git a/libavformat/tests/.gitignore b/libavformat/tests/.gitignore new file mode 100644 index 0000000000..cfd51f22e9 --- /dev/null +++ b/libavformat/tests/.gitignore @@ -0,0 +1,5 @@ +/movenc +/noproxy +/seek +/srtp +/url diff --git a/libavformat/movenc-test.c b/libavformat/tests/movenc.c index e7b67e1e7a..711e1579b2 100644 --- a/libavformat/movenc-test.c +++ b/libavformat/tests/movenc.c @@ -24,7 +24,7 @@ #include "libavutil/mathematics.h" #include "libavutil/md5.h" -#include "avformat.h" +#include "libavformat/avformat.h" #if HAVE_UNISTD_H #include <unistd.h> diff --git a/libavformat/noproxy-test.c b/libavformat/tests/noproxy.c index e6cc421413..9daee052d9 100644 --- a/libavformat/noproxy-test.c +++ b/libavformat/tests/noproxy.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "network.h" +#include "libavformat/network.h" static void test(const char *pattern, const char *host) { diff --git a/libavformat/rtmpdh-test.c b/libavformat/tests/rtmpdh.c index 603bb79ebc..c25ca91b7e 100644 --- a/libavformat/rtmpdh-test.c +++ b/libavformat/tests/rtmpdh.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "rtmpdh.c" +#include "libavformat/rtmpdh.c" #include <stdio.h> diff --git a/libavformat/seek-test.c b/libavformat/tests/seek.c index 97062d5dfc..82da3744db 100644 --- a/libavformat/seek-test.c +++ b/libavformat/tests/seek.c @@ -26,6 +26,7 @@ #include "libavutil/common.h" #include "libavutil/mathematics.h" + #include "libavformat/avformat.h" static char buffer[20]; diff --git a/libavformat/srtp-test.c b/libavformat/tests/srtp.c index fe8749cb66..1703193620 100644 --- a/libavformat/srtp-test.c +++ b/libavformat/tests/srtp.c @@ -20,8 +20,8 @@ #include <stdio.h> #include <string.h> -#include "rtpdec.h" -#include "srtp.h" +#include "libavformat/rtpdec.h" +#include "libavformat/srtp.h" static const char *aes128_80_key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn"; diff --git a/libavformat/url-test.c b/libavformat/tests/url.c index 503b36e572..ec33173e40 100644 --- a/libavformat/url-test.c +++ b/libavformat/tests/url.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "url.h" +#include "libavformat/url.h" static void test(const char *base, const char *rel) { diff --git a/libavresample/tests/.gitignore b/libavresample/tests/.gitignore new file mode 100644 index 0000000000..1e15871d54 --- /dev/null +++ b/libavresample/tests/.gitignore @@ -0,0 +1 @@ +/avresample diff --git a/libavresample/avresample-test.c b/libavresample/tests/avresample.c index 697b4ba799..77599960f8 100644 --- a/libavresample/avresample-test.c +++ b/libavresample/tests/avresample.c @@ -30,7 +30,8 @@ #include "libavutil/mem.h" #include "libavutil/opt.h" #include "libavutil/samplefmt.h" -#include "avresample.h" + +#include "libavresample/avresample.h" static double dbl_rand(AVLFG *lfg) { diff --git a/libavutil/des.c b/libavutil/des.c index 1dbedd92cd..75a5d896fb 100644 --- a/libavutil/des.c +++ b/libavutil/des.c @@ -111,7 +111,7 @@ static const uint8_t S_boxes[8][32] = { #else /** * This table contains the results of applying both the S-box and P-shuffle. - * It can be regenerated by compiling des-test.c with "-DCONFIG_SMALL -DGENTABLES". + * It can be regenerated by compiling tests/des.c with "-DCONFIG_SMALL -DGENTABLES". */ static const uint32_t S_boxes_P_shuffle[8][64] = { { 0x00808200, 0x00000000, 0x00008000, 0x00808202, 0x00808002, 0x00008202, 0x00000002, 0x00008000, diff --git a/libavutil/tests/.gitignore b/libavutil/tests/.gitignore new file mode 100644 index 0000000000..c4d1d065fb --- /dev/null +++ b/libavutil/tests/.gitignore @@ -0,0 +1,21 @@ +/adler32 +/aes +/atomic +/avstring +/base64 +/blowfish +/cpu +/crc +/des +/eval +/fifo +/float_dsp +/hmac +/lfg +/lls +/md5 +/opt +/parseutils +/sha +/tree +/xtea diff --git a/libavutil/adler32-test.c b/libavutil/tests/adler32.c index ab109f9175..323690056c 100644 --- a/libavutil/adler32-test.c +++ b/libavutil/tests/adler32.c @@ -18,9 +18,9 @@ #include <string.h> -#include "log.h" -#include "timer.h" -#include "adler32.h" +#include "libavutil/log.h" +#include "libavutil/timer.h" +#include "libavutil/adler32.h" #define LEN 7001 diff --git a/libavutil/aes-test.c b/libavutil/tests/aes.c index afb5ad3685..49ca553e0a 100644 --- a/libavutil/aes-test.c +++ b/libavutil/tests/aes.c @@ -16,12 +16,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "aes.c" +#include "libavutil/aes.c" #include <string.h> -#include "lfg.h" -#include "log.h" +#include "libavutil/lfg.h" +#include "libavutil/log.h" int main(int argc, char **argv) { diff --git a/libavutil/atomic-test.c b/libavutil/tests/atomic.c index c0a89a461e..70636f42fb 100644 --- a/libavutil/atomic-test.c +++ b/libavutil/tests/atomic.c @@ -18,7 +18,7 @@ #include <assert.h> -#include "atomic.h" +#include "libavutil/atomic.h" int main(void) { diff --git a/libavutil/avstring-test.c b/libavutil/tests/avstring.c index fc4f0a415e..2e5ee2d44a 100644 --- a/libavutil/avstring-test.c +++ b/libavutil/tests/avstring.c @@ -18,9 +18,9 @@ #include <stdio.h> -#include "common.h" -#include "mem.h" -#include "avstring.h" +#include "libavutil/common.h" +#include "libavutil/mem.h" +#include "libavutil/avstring.h" int main(void) { diff --git a/libavutil/base64-test.c b/libavutil/tests/base64.c index 3ce0518a84..16ea399788 100644 --- a/libavutil/base64-test.c +++ b/libavutil/tests/base64.c @@ -19,8 +19,8 @@ #include <stdint.h> #include <stdio.h> -#include "common.h" -#include "base64.h" +#include "libavutil/common.h" +#include "libavutil/base64.h" #define MAX_DATA_SIZE 1024 #define MAX_ENCODED_SIZE 2048 diff --git a/libavutil/blowfish-test.c b/libavutil/tests/blowfish.c index 4281ca29bd..acaab70aeb 100644 --- a/libavutil/blowfish-test.c +++ b/libavutil/tests/blowfish.c @@ -21,7 +21,7 @@ #include <stdlib.h> #include <string.h> -#include "blowfish.h" +#include "libavutil/blowfish.h" #define NUM_VARIABLE_KEY_TESTS 34 diff --git a/libavutil/cpu-test.c b/libavutil/tests/cpu.c index a2c3b38c0d..176b7eb030 100644 --- a/libavutil/cpu-test.c +++ b/libavutil/tests/cpu.c @@ -27,9 +27,9 @@ #include <stdint.h> #include <stdio.h> -#include "avstring.h" -#include "common.h" -#include "cpu.h" +#include "libavutil/avstring.h" +#include "libavutil/common.h" +#include "libavutil/cpu.h" static const struct { int flag; diff --git a/libavutil/crc-test.c b/libavutil/tests/crc.c index ef15fb5669..c2c609fba8 100644 --- a/libavutil/crc-test.c +++ b/libavutil/tests/crc.c @@ -19,7 +19,7 @@ #include <stdint.h> #include <stdio.h> -#include "crc.h" +#include "libavutil/crc.h" int main(void) { diff --git a/libavutil/des-test.c b/libavutil/tests/des.c index a372035a54..1e7a2fa50a 100644 --- a/libavutil/des-test.c +++ b/libavutil/tests/des.c @@ -16,14 +16,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "des.c" +#include "libavutil/des.c" #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "time.h" +#include "libavutil/time.h" static uint64_t rand64(void) { diff --git a/libavutil/eval-test.c b/libavutil/tests/eval.c index 3551f17b20..818c59ccdb 100644 --- a/libavutil/eval-test.c +++ b/libavutil/tests/eval.c @@ -20,9 +20,9 @@ #include <stdio.h> #include <string.h> -#include "libm.h" -#include "timer.h" -#include "eval.h" +#include "libavutil/libm.h" +#include "libavutil/timer.h" +#include "libavutil/eval.h" static const double const_values[] = { M_PI, diff --git a/libavutil/fifo-test.c b/libavutil/tests/fifo.c index f6615b1034..4c4b37a501 100644 --- a/libavutil/fifo-test.c +++ b/libavutil/tests/fifo.c @@ -18,7 +18,7 @@ #include <stdio.h> -#include "fifo.h" +#include "libavutil/fifo.h" int main(void) { diff --git a/libavutil/float_dsp-test.c b/libavutil/tests/float_dsp.c index e24018c07d..ab6bf6a569 100644 --- a/libavutil/float_dsp-test.c +++ b/libavutil/tests/float_dsp.c @@ -21,12 +21,12 @@ #include <stdlib.h> #include <string.h> -#include "cpu.h" -#include "internal.h" -#include "lfg.h" -#include "log.h" -#include "random_seed.h" -#include "float_dsp.h" +#include "libavutil/cpu.h" +#include "libavutil/internal.h" +#include "libavutil/lfg.h" +#include "libavutil/log.h" +#include "libavutil/random_seed.h" +#include "libavutil/float_dsp.h" #define LEN 240 diff --git a/libavutil/hmac-test.c b/libavutil/tests/hmac.c index f97c8a6ab3..600240fe97 100644 --- a/libavutil/hmac-test.c +++ b/libavutil/tests/hmac.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "hmac.c" +#include "libavutil/hmac.c" #include <stdio.h> #include <string.h> diff --git a/libavutil/lfg-test.c b/libavutil/tests/lfg.c index 92b4259a3c..9a0c47c4de 100644 --- a/libavutil/lfg-test.c +++ b/libavutil/tests/lfg.c @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "log.h" -#include "timer.h" -#include "lfg.h" +#include "libavutil/log.h" +#include "libavutil/timer.h" +#include "libavutil/lfg.h" int main(void) { diff --git a/libavutil/lls-test.c b/libavutil/tests/lls.c index f9814b3863..7866b38998 100644 --- a/libavutil/lls-test.c +++ b/libavutil/tests/lls.c @@ -19,9 +19,9 @@ #include <limits.h> #include <stdio.h> -#include "internal.h" -#include "lfg.h" -#include "lls.h" +#include "libavutil/internal.h" +#include "libavutil/lfg.h" +#include "libavutil/lls.h" int main(void) { diff --git a/libavutil/md5-test.c b/libavutil/tests/md5.c index 8d5dd1e104..9fb7006dd8 100644 --- a/libavutil/md5-test.c +++ b/libavutil/tests/md5.c @@ -19,7 +19,7 @@ #include <stdint.h> #include <stdio.h> -#include "md5.h" +#include "libavutil/md5.h" static void print_md5(uint8_t *md5) { diff --git a/libavutil/opt-test.c b/libavutil/tests/opt.c index 6262b77e5b..350ce3d820 100644 --- a/libavutil/opt-test.c +++ b/libavutil/tests/opt.c @@ -19,12 +19,12 @@ #include <limits.h> #include <stdio.h> -#include "common.h" -#include "error.h" -#include "log.h" -#include "mem.h" -#include "rational.h" -#include "opt.h" +#include "libavutil/common.h" +#include "libavutil/error.h" +#include "libavutil/log.h" +#include "libavutil/mem.h" +#include "libavutil/rational.h" +#include "libavutil/opt.h" typedef struct TestContext { const AVClass *class; diff --git a/libavutil/parseutils-test.c b/libavutil/tests/parseutils.c index 149861f1d5..805c01ff5a 100644 --- a/libavutil/parseutils-test.c +++ b/libavutil/tests/parseutils.c @@ -19,10 +19,10 @@ #include <stdint.h> #include <stdio.h> -#include "common.h" -#include "log.h" -#include "rational.h" -#include "parseutils.h" +#include "libavutil/common.h" +#include "libavutil/log.h" +#include "libavutil/rational.h" +#include "libavutil/parseutils.h" int main(void) { diff --git a/libavutil/sha-test.c b/libavutil/tests/sha.c index 5f62a98ea3..0f1d514b44 100644 --- a/libavutil/sha-test.c +++ b/libavutil/tests/sha.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "sha.c" +#include "libavutil/sha.c" #include <stdio.h> diff --git a/libavutil/tree-test.c b/libavutil/tests/tree.c index f93e53409d..fb19b27896 100644 --- a/libavutil/tree-test.c +++ b/libavutil/tests/tree.c @@ -16,13 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "tree.c" +#include "libavutil/tree.c" #include <stdint.h> -#include "common.h" -#include "lfg.h" -#include "log.h" +#include "libavutil/common.h" +#include "libavutil/lfg.h" +#include "libavutil/log.h" static int check(AVTreeNode *t) { diff --git a/libavutil/xtea-test.c b/libavutil/tests/xtea.c index 98445760eb..326f2714a9 100644 --- a/libavutil/xtea-test.c +++ b/libavutil/tests/xtea.c @@ -21,8 +21,8 @@ #include <stdlib.h> #include <string.h> -#include "intreadwrite.h" -#include "xtea.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/xtea.h" #define XTEA_NUM_TESTS 6 diff --git a/library.mak b/library.mak index c980c3dbe3..712b7e1c6e 100644 --- a/library.mak +++ b/library.mak @@ -44,11 +44,12 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS) $(SLIB_EXTRA_CMD) clean:: - $(RM) $(addprefix $(SUBDIR),*-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ - $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) + $(RM) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ + $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) $(CLEANSUFFIXES:%=$(SUBDIR)tests/%) distclean:: clean - $(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) $(DISTCLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) + $(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) $(DISTCLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) \ + $(DISTCLEANSUFFIXES:%=$(SUBDIR)tests/%) install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) $(Q)mkdir -p "$(SHLIBDIR)" diff --git a/libswscale/tests/.gitignore b/libswscale/tests/.gitignore new file mode 100644 index 0000000000..0ac3691ecd --- /dev/null +++ b/libswscale/tests/.gitignore @@ -0,0 +1,2 @@ +/colorspace +/swscale diff --git a/libswscale/colorspace-test.c b/libswscale/tests/colorspace.c index fbf595d4c1..962b11a857 100644 --- a/libswscale/colorspace-test.c +++ b/libswscale/tests/colorspace.c @@ -23,10 +23,11 @@ #include <stdlib.h> #include <inttypes.h> -#include "swscale.h" -#include "rgb2rgb.h" #include "libavutil/mem.h" +#include "libswscale/rgb2rgb.h" +#include "libswscale/swscale.h" + #define SIZE 1000 #define srcByte 0x55 #define dstByte 0xBB diff --git a/libswscale/swscale-test.c b/libswscale/tests/swscale.c index 8063519be1..309ef812c7 100644 --- a/libswscale/swscale-test.c +++ b/libswscale/tests/swscale.c @@ -31,7 +31,8 @@ #include "libavutil/crc.h" #include "libavutil/pixdesc.h" #include "libavutil/lfg.h" -#include "swscale.h" + +#include "libswscale/swscale.h" /* HACK Duplicated from swscale_internal.h. * Should be removed when a cleaner pixel format system exists. */ diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 9edfa9aeb6..d11ca3c1f7 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -167,7 +167,7 @@ pixfmts(){ filter=${test#filter-pixfmts-} filter_args=$1 - showfiltfmts="$target_exec $target_path/libavfilter/filtfmts-test" + showfiltfmts="$target_exec $target_path/libavfilter/tests/filtfmts" exclude_fmts=${outfile}${filter}_exclude_fmts out_fmts=${outfile}${filter}_out_fmts diff --git a/tests/fate/fft.mak b/tests/fate/fft.mak index 6349e5ac75..3360a07e66 100644 --- a/tests/fate/fft.mak +++ b/tests/fate/fft.mak @@ -23,8 +23,8 @@ fate-rdft-float: $(FATE_RDFT-yes) FATE_FFT_ALL = $(FATE_DCT-yes) $(FATE_FFT-yes) $(FATE_MDCT-yes) $(FATE_RDFT-yes) -$(FATE_FFT_ALL): libavcodec/fft-test$(EXESUF) -$(FATE_FFT_ALL): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) +$(FATE_FFT_ALL): libavcodec/tests/fft$(EXESUF) +$(FATE_FFT_ALL): CMD = run libavcodec/tests/fft $(CPUFLAGS:%=-c%) $(ARGS) define DEF_FFT_FIXED FATE_FFT_FIXED-$(CONFIG_FFT) += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) @@ -43,8 +43,8 @@ fate-mdct-fixed: $(FATE_MDCT_FIXED-yes) FATE_FFT_FIXED_ALL = $(FATE_FFT_FIXED-yes) $(FATE_MDCT_FIXED-yes) -$(FATE_FFT_FIXED_ALL): libavcodec/fft-fixed-test$(EXESUF) -$(FATE_FFT_FIXED_ALL): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) +$(FATE_FFT_FIXED_ALL): libavcodec/tests/fft-fixed$(EXESUF) +$(FATE_FFT_FIXED_ALL): CMD = run libavcodec/tests/fft-fixed $(CPUFLAGS:%=-c%) $(ARGS) $(FATE_FFT_ALL) $(FATE_FFT_FIXED_ALL): REF = /dev/null diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 42fb063547..d9315480e4 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -160,7 +160,7 @@ fate-filter-pixfmts-scale: CMD = pixfmts "200:100" FATE_FILTER_PIXFMTS += fate-filter-pixfmts-vflip fate-filter-pixfmts-vflip: CMD = pixfmts -$(FATE_FILTER_PIXFMTS): libavfilter/filtfmts-test$(EXESUF) +$(FATE_FILTER_PIXFMTS): libavfilter/tests/filtfmts$(EXESUF) FATE_FILTER_VSYNTH-$(CONFIG_FORMAT_FILTER) += $(FATE_FILTER_PIXFMTS) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index 138a1b2dcf..d656acefb7 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -1,21 +1,21 @@ FATE_LIBAVCODEC-$(CONFIG_GOLOMB) += fate-golomb -fate-golomb: libavcodec/golomb-test$(EXESUF) -fate-golomb: CMD = run libavcodec/golomb-test +fate-golomb: libavcodec/tests/golomb$(EXESUF) +fate-golomb: CMD = run libavcodec/tests/golomb fate-golomb: REF = /dev/null FATE_LIBAVCODEC-$(CONFIG_IDCTDSP) += fate-idct8x8 -fate-idct8x8: libavcodec/dct-test$(EXESUF) -fate-idct8x8: CMD = run libavcodec/dct-test -i +fate-idct8x8: libavcodec/tests/dct$(EXESUF) +fate-idct8x8: CMD = run libavcodec/tests/dct -i fate-idct8x8: CMP = null fate-idct8x8: REF = /dev/null FATE_LIBAVCODEC-$(CONFIG_IIRFILTER) += fate-iirfilter -fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) -fate-iirfilter: CMD = run libavcodec/iirfilter-test +fate-iirfilter: libavcodec/tests/iirfilter$(EXESUF) +fate-iirfilter: CMD = run libavcodec/tests/iirfilter FATE_LIBAVCODEC-$(CONFIG_RANGECODER) += fate-rangecoder -fate-rangecoder: libavcodec/rangecoder-test$(EXESUF) -fate-rangecoder: CMD = run libavcodec/rangecoder-test +fate-rangecoder: libavcodec/tests/rangecoder$(EXESUF) +fate-rangecoder: CMD = run libavcodec/tests/rangecoder fate-rangecoder: CMP = null fate-rangecoder: REF = /dev/null diff --git a/tests/fate/libavdevice.mak b/tests/fate/libavdevice.mak index b30ae99779..e983327a50 100644 --- a/tests/fate/libavdevice.mak +++ b/tests/fate/libavdevice.mak @@ -1,6 +1,6 @@ FATE_LIBAVDEVICE-$(CONFIG_JACK_INDEV) += fate-timefilter -fate-timefilter: libavdevice/timefilter-test$(EXESUF) -fate-timefilter: CMD = run libavdevice/timefilter-test +fate-timefilter: libavdevice/tests/timefilter$(EXESUF) +fate-timefilter: CMD = run libavdevice/tests/timefilter FATE-$(CONFIG_AVDEVICE) += $(FATE_LIBAVDEVICE-yes) fate-libavdevice: $(FATE_LIBAVDEVICE-yes) diff --git a/tests/fate/libavformat.mak b/tests/fate/libavformat.mak index e98e0eee1e..30f0e03cb8 100644 --- a/tests/fate/libavformat.mak +++ b/tests/fate/libavformat.mak @@ -1,22 +1,22 @@ FATE_LIBAVFORMAT-$(CONFIG_NETWORK) += fate-noproxy -fate-noproxy: libavformat/noproxy-test$(EXESUF) -fate-noproxy: CMD = run libavformat/noproxy-test +fate-noproxy: libavformat/tests/noproxy$(EXESUF) +fate-noproxy: CMD = run libavformat/tests/noproxy FATE_LIBAVFORMAT-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += fate-rtmpdh -fate-rtmpdh: libavformat/rtmpdh-test$(EXESUF) -fate-rtmpdh: CMD = run libavformat/rtmpdh-test +fate-rtmpdh: libavformat/tests/rtmpdh$(EXESUF) +fate-rtmpdh: CMD = run libavformat/tests/rtmpdh FATE_LIBAVFORMAT-$(CONFIG_SRTP) += fate-srtp -fate-srtp: libavformat/srtp-test$(EXESUF) -fate-srtp: CMD = run libavformat/srtp-test +fate-srtp: libavformat/tests/srtp$(EXESUF) +fate-srtp: CMD = run libavformat/tests/srtp FATE_LIBAVFORMAT-yes += fate-url -fate-url: libavformat/url-test$(EXESUF) -fate-url: CMD = run libavformat/url-test +fate-url: libavformat/tests/url$(EXESUF) +fate-url: CMD = run libavformat/tests/url FATE_LIBAVFORMAT-$(CONFIG_MOV_MUXER) += fate-movenc -fate-movenc: libavformat/movenc-test$(EXESUF) -fate-movenc: CMD = run libavformat/movenc-test +fate-movenc: libavformat/tests/movenc$(EXESUF) +fate-movenc: CMD = run libavformat/tests/movenc FATE-$(CONFIG_AVFORMAT) += $(FATE_LIBAVFORMAT-yes) fate-libavformat: $(FATE_LIBAVFORMAT) diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index 7f3329b1d5..69e4042a8b 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -1,82 +1,82 @@ FATE_LIBAVUTIL += fate-adler32 -fate-adler32: libavutil/adler32-test$(EXESUF) -fate-adler32: CMD = run libavutil/adler32-test +fate-adler32: libavutil/tests/adler32$(EXESUF) +fate-adler32: CMD = run libavutil/tests/adler32 fate-adler32: REF = /dev/null FATE_LIBAVUTIL += fate-aes -fate-aes: libavutil/aes-test$(EXESUF) -fate-aes: CMD = run libavutil/aes-test +fate-aes: libavutil/tests/aes$(EXESUF) +fate-aes: CMD = run libavutil/tests/aes fate-aes: REF = /dev/null FATE_LIBAVUTIL += fate-atomic -fate-atomic: libavutil/atomic-test$(EXESUF) -fate-atomic: CMD = run libavutil/atomic-test +fate-atomic: libavutil/tests/atomic$(EXESUF) +fate-atomic: CMD = run libavutil/tests/atomic fate-atomic: REF = /dev/null FATE_LIBAVUTIL += fate-avstring -fate-avstring: libavutil/avstring-test$(EXESUF) -fate-avstring: CMD = run libavutil/avstring-test +fate-avstring: libavutil/tests/avstring$(EXESUF) +fate-avstring: CMD = run libavutil/tests/avstring FATE_LIBAVUTIL += fate-base64 -fate-base64: libavutil/base64-test$(EXESUF) -fate-base64: CMD = run libavutil/base64-test +fate-base64: libavutil/tests/base64$(EXESUF) +fate-base64: CMD = run libavutil/tests/base64 FATE_LIBAVUTIL += fate-blowfish -fate-blowfish: libavutil/blowfish-test$(EXESUF) -fate-blowfish: CMD = run libavutil/blowfish-test +fate-blowfish: libavutil/tests/blowfish$(EXESUF) +fate-blowfish: CMD = run libavutil/tests/blowfish FATE_LIBAVUTIL += fate-cpu -fate-cpu: libavutil/cpu-test$(EXESUF) -fate-cpu: CMD = run libavutil/cpu-test $(CPUFLAGS:%=-c%) $(THREADS:%=-t%) +fate-cpu: libavutil/tests/cpu$(EXESUF) +fate-cpu: CMD = run libavutil/tests/cpu $(CPUFLAGS:%=-c%) $(THREADS:%=-t%) fate-cpu: REF = /dev/null FATE_LIBAVUTIL += fate-crc -fate-crc: libavutil/crc-test$(EXESUF) -fate-crc: CMD = run libavutil/crc-test +fate-crc: libavutil/tests/crc$(EXESUF) +fate-crc: CMD = run libavutil/tests/crc FATE_LIBAVUTIL += fate-des -fate-des: libavutil/des-test$(EXESUF) -fate-des: CMD = run libavutil/des-test +fate-des: libavutil/tests/des$(EXESUF) +fate-des: CMD = run libavutil/tests/des fate-des: REF = /dev/null FATE_LIBAVUTIL += fate-eval -fate-eval: libavutil/eval-test$(EXESUF) -fate-eval: CMD = run libavutil/eval-test +fate-eval: libavutil/tests/eval$(EXESUF) +fate-eval: CMD = run libavutil/tests/eval FATE_LIBAVUTIL += fate-fifo -fate-fifo: libavutil/fifo-test$(EXESUF) -fate-fifo: CMD = run libavutil/fifo-test +fate-fifo: libavutil/tests/fifo$(EXESUF) +fate-fifo: CMD = run libavutil/tests/fifo FATE_LIBAVUTIL += fate-float-dsp -fate-float-dsp: libavutil/float_dsp-test$(EXESUF) -fate-float-dsp: CMD = run libavutil/float_dsp-test +fate-float-dsp: libavutil/tests/float_dsp$(EXESUF) +fate-float-dsp: CMD = run libavutil/tests/float_dsp fate-float-dsp: CMP = null fate-float-dsp: REF = /dev/null FATE_LIBAVUTIL += fate-hmac -fate-hmac: libavutil/hmac-test$(EXESUF) -fate-hmac: CMD = run libavutil/hmac-test +fate-hmac: libavutil/tests/hmac$(EXESUF) +fate-hmac: CMD = run libavutil/tests/hmac FATE_LIBAVUTIL += fate-md5 -fate-md5: libavutil/md5-test$(EXESUF) -fate-md5: CMD = run libavutil/md5-test +fate-md5: libavutil/tests/md5$(EXESUF) +fate-md5: CMD = run libavutil/tests/md5 FATE_LIBAVUTIL += fate-parseutils -fate-parseutils: libavutil/parseutils-test$(EXESUF) -fate-parseutils: CMD = run libavutil/parseutils-test +fate-parseutils: libavutil/tests/parseutils$(EXESUF) +fate-parseutils: CMD = run libavutil/tests/parseutils FATE_LIBAVUTIL += fate-sha -fate-sha: libavutil/sha-test$(EXESUF) -fate-sha: CMD = run libavutil/sha-test +fate-sha: libavutil/tests/sha$(EXESUF) +fate-sha: CMD = run libavutil/tests/sha FATE_LIBAVUTIL += fate-tree -fate-tree: libavutil/tree-test$(EXESUF) -fate-tree: CMD = run libavutil/tree-test +fate-tree: libavutil/tests/tree$(EXESUF) +fate-tree: CMD = run libavutil/tests/tree fate-tree: REF = /dev/null FATE_LIBAVUTIL += fate-xtea -fate-xtea: libavutil/xtea-test$(EXESUF) -fate-xtea: CMD = run libavutil/xtea-test +fate-xtea: libavutil/tests/xtea$(EXESUF) +fate-xtea: CMD = run libavutil/tests/xtea FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL) diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index 88555f7e55..60adab2085 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -218,8 +218,8 @@ fate-seek-lavf-yuv4mpeg: SRC = lavf/lavf.y4m FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%) -$(FATE_SEEK): libavformat/seek-test$(EXESUF) -$(FATE_SEEK): CMD = run libavformat/seek-test$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC) +$(FATE_SEEK): libavformat/tests/seek$(EXESUF) +$(FATE_SEEK): CMD = run libavformat/tests/seek$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC) $(FATE_SEEK): fate-seek-%: fate-% fate-seek-%: REF = $(SRC_PATH)/tests/ref/seek/$(@:fate-seek-%=%) |