summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--common.mak7
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavcodec/tests/.gitignore16
-rw-r--r--libavcodec/tests/arm/dct.c (renamed from libavcodec/arm/dct-test.c)2
-rw-r--r--libavcodec/tests/avfft.c (renamed from libavcodec/avfft-test.c)2
-rw-r--r--libavcodec/tests/cabac.c (renamed from libavcodec/cabac-test.c)4
-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-fixed32.c (renamed from libavcodec/fft-fixed32-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/imgconvert.c (renamed from libavcodec/imgconvert-test.c)2
-rw-r--r--libavcodec/tests/jpeg2000dwt.c (renamed from libavcodec/jpeg2000dwt-test.c)2
-rw-r--r--libavcodec/tests/mathops.c (renamed from libavcodec/mathops-test.c)2
-rw-r--r--libavcodec/tests/motion.c (renamed from libavcodec/motion-test.c)2
-rw-r--r--libavcodec/tests/options.c (renamed from libavcodec/options-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/snowenc.c (renamed from libavcodec/snowenc-test.c)2
-rw-r--r--libavcodec/tests/utils.c (renamed from libavcodec/utils-test.c)2
-rw-r--r--libavcodec/tests/x86/dct.c (renamed from libavcodec/x86/dct-test.c)6
-rw-r--r--libavdevice/tests/.gitignore1
-rw-r--r--libavdevice/tests/timefilter.c (renamed from libavdevice/timefilter-test.c)2
-rw-r--r--libavfilter/tests/.gitignore3
-rw-r--r--libavfilter/tests/drawutils.c (renamed from libavfilter/drawutils-test.c)2
-rw-r--r--libavfilter/tests/filtfmts.c (renamed from libavfilter/filtfmts-test.c)0
-rw-r--r--libavfilter/tests/formats.c (renamed from libavfilter/formats-test.c)2
-rw-r--r--libavformat/matroskaenc.c21
-rw-r--r--libavformat/tests/.gitignore6
-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/.gitignore1
-rw-r--r--libavresample/tests/avresample.c (renamed from libavresample/avresample-test.c)3
-rw-r--r--libavutil/Makefile2
-rw-r--r--libavutil/des.c2
-rw-r--r--libavutil/tests/.gitignore44
-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)8
-rw-r--r--libavutil/tests/atomic.c (renamed from libavutil/atomic-test.c)4
-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)6
-rw-r--r--libavutil/tests/blowfish.c (renamed from libavutil/blowfish-test.c)2
-rw-r--r--libavutil/tests/bprint.c (renamed from libavutil/bprint-test.c)2
-rw-r--r--libavutil/tests/camellia.c (renamed from libavutil/camellia-test.c)4
-rw-r--r--libavutil/tests/cast5.c (renamed from libavutil/cast5-test.c)4
-rw-r--r--libavutil/tests/color_utils.c (renamed from libavutil/color_utils-test.c)2
-rw-r--r--libavutil/tests/cpu.c (renamed from libavutil/cpu-test.c)5
-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/dict.c (renamed from libavutil/dict-test.c)2
-rw-r--r--libavutil/tests/display.c (renamed from libavutil/display-test.c)2
-rw-r--r--libavutil/tests/error.c (renamed from libavutil/error-test.c)2
-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/file.c (renamed from libavutil/file-test.c)2
-rw-r--r--libavutil/tests/float_dsp.c (renamed from libavutil/float_dsp-test.c)14
-rw-r--r--libavutil/tests/hash.c (renamed from libavutil/hash-test.c)2
-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/log.c (renamed from libavutil/log-test.c)2
-rw-r--r--libavutil/tests/lzo.c (renamed from libavutil/lzo-test.c)8
-rw-r--r--libavutil/tests/md5.c (renamed from libavutil/md5-test.c)2
-rw-r--r--libavutil/tests/murmur3.c (renamed from libavutil/murmur3-test.c)6
-rw-r--r--libavutil/tests/opt.c (renamed from libavutil/opt-test.c)16
-rw-r--r--libavutil/tests/parseutils.c (renamed from libavutil/parseutils-test.c)8
-rw-r--r--libavutil/tests/pca.c (renamed from libavutil/pca-test.c)4
-rw-r--r--libavutil/tests/pixdesc.c (renamed from libavutil/pixdesc-test.c)2
-rw-r--r--libavutil/tests/pixelutils.c (renamed from libavutil/pixelutils-test.c)2
-rw-r--r--libavutil/tests/random_seed.c (renamed from libavutil/random_seed-test.c)2
-rw-r--r--libavutil/tests/rational.c (renamed from libavutil/rational-test.c)5
-rw-r--r--libavutil/tests/ripemd.c (renamed from libavutil/ripemd-test.c)4
-rw-r--r--libavutil/tests/sha.c (renamed from libavutil/sha-test.c)4
-rw-r--r--libavutil/tests/sha512.c (renamed from libavutil/sha512-test.c)4
-rw-r--r--libavutil/tests/softfloat.c (renamed from libavutil/softfloat-test.c)7
-rw-r--r--libavutil/tests/tea.c (renamed from libavutil/tea-test.c)4
-rw-r--r--libavutil/tests/tree.c (renamed from libavutil/tree-test.c)8
-rw-r--r--libavutil/tests/twofish.c (renamed from libavutil/twofish-test.c)4
-rw-r--r--libavutil/tests/utf8.c (renamed from libavutil/utf8-test.c)0
-rw-r--r--libavutil/tests/xtea.c (renamed from libavutil/xtea-test.c)4
-rw-r--r--library.mak9
-rw-r--r--libswresample/tests/.gitignore1
-rw-r--r--libswresample/tests/swresample.c (renamed from libswresample/swresample-test.c)3
-rw-r--r--libswscale/tests/.gitignore2
-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-xtests/fate-run.sh2
-rw-r--r--tests/fate/fft.mak16
-rw-r--r--tests/fate/filter-audio.mak4
-rw-r--r--tests/fate/filter-video.mak2
-rw-r--r--tests/fate/libavcodec.mak36
-rw-r--r--tests/fate/libavdevice.mak4
-rw-r--r--tests/fate/libavformat.mak24
-rw-r--r--tests/fate/libavutil.mak132
-rw-r--r--tests/fate/seek.mak8
101 files changed, 364 insertions, 285 deletions
diff --git a/.gitignore b/.gitignore
index 0eca7a16e9..2b251c96c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,7 +18,6 @@
*.so.*
*.swp
*.ver
-*-test
*_g
\#*
.\#*
diff --git a/common.mak b/common.mak
index 700e4c1f77..59b039fa67 100644
--- a/common.mak
+++ b/common.mak
@@ -114,8 +114,8 @@ FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS)
OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
SLIBOBJS := $(sort $(SLIBOBJS:%=$(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)
@@ -158,8 +158,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 91df1ac998..7c3aa69590 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1042,7 +1042,7 @@ HOSTPROGS = aacps_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..d8ab947abe
--- /dev/null
+++ b/libavcodec/tests/.gitignore
@@ -0,0 +1,16 @@
+/avfft
+/cabac
+/dct
+/fft
+/fft-fixed
+/fft-fixed32
+/golomb
+/iirfilter
+/imgconvert
+/jpeg2000dwt
+/mathops
+/motion
+/options
+/rangecoder
+/snowenc
+/utils
diff --git a/libavcodec/arm/dct-test.c b/libavcodec/tests/arm/dct.c
index f9076b394f..596d369a99 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/avfft-test.c b/libavcodec/tests/avfft.c
index c2d4cc44f7..6bc48ea870 100644
--- a/libavcodec/avfft-test.c
+++ b/libavcodec/tests/avfft.c
@@ -18,7 +18,7 @@
#include "config.h"
#include "libavutil/mem.h"
-#include "avfft.h"
+#include "libavcodec/avfft.h"
int main(int argc, char **argv)
{
diff --git a/libavcodec/cabac-test.c b/libavcodec/tests/cabac.c
index 47f31e997c..affe4eb141 100644
--- a/libavcodec/cabac-test.c
+++ b/libavcodec/tests/cabac.c
@@ -18,12 +18,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "cabac.c"
+#include "libavcodec/cabac.c"
#define SIZE 10240
#include "libavutil/lfg.h"
-#include "avcodec.h"
+#include "libavcodec/avcodec.h"
static inline void put_cabac_bit(CABACContext *c, int b){
put_bits(&c->pb, 1, b);
diff --git a/libavcodec/dct-test.c b/libavcodec/tests/dct.c
index df1b75db87..5303fdff8f 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/dct.h"
+#include "libavcodec/idctdsp.h"
+#include "libavcodec/simple_idct.h"
+#include "libavcodec/xvididct.h"
+#include "libavcodec/aandcttab.h"
+#include "libavcodec/faandct.h"
+#include "libavcodec/faanidct.h"
+#include "libavcodec/dctref.h"
struct algo {
const char *name;
@@ -94,11 +95,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 330211ebf6..fe1b57a3f6 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-fixed32-test.c b/libavcodec/tests/fft-fixed32.c
index 4bd11cea61..f33494f7f3 100644
--- a/libavcodec/fft-fixed32-test.c
+++ b/libavcodec/tests/fft-fixed32.c
@@ -18,4 +18,4 @@
#define FFT_FLOAT 0
#define FFT_FIXED_32 1
-#include "fft-test.c"
+#include "fft.c"
diff --git a/libavcodec/fft-test.c b/libavcodec/tests/fft.c
index d647fde119..4717303155 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 2dfe917144..965367b7be 100644
--- a/libavcodec/golomb-test.c
+++ b/libavcodec/tests/golomb.c
@@ -23,9 +23,9 @@
#include "libavutil/mem.h"
-#include "get_bits.h"
-#include "golomb.h"
-#include "put_bits.h"
+#include "libavcodec/get_bits.h"
+#include "libavcodec/golomb.h"
+#include "libavcodec/put_bits.h"
#define COUNT 8191
#define SIZE (COUNT * 4)
diff --git a/libavcodec/iirfilter-test.c b/libavcodec/tests/iirfilter.c
index cd250a385f..60cc6fc43d 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/imgconvert-test.c b/libavcodec/tests/imgconvert.c
index 96004d79c2..c598d461d3 100644
--- a/libavcodec/imgconvert-test.c
+++ b/libavcodec/tests/imgconvert.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "imgconvert.c"
+#include "libavcodec/imgconvert.c"
#if FF_API_AVPICTURE
FF_DISABLE_DEPRECATION_WARNINGS
diff --git a/libavcodec/jpeg2000dwt-test.c b/libavcodec/tests/jpeg2000dwt.c
index 30f1ce1ef7..80b33bee79 100644
--- a/libavcodec/jpeg2000dwt-test.c
+++ b/libavcodec/tests/jpeg2000dwt.c
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "jpeg2000dwt.c"
+#include "libavcodec/jpeg2000dwt.c"
#include "libavutil/lfg.h"
diff --git a/libavcodec/mathops-test.c b/libavcodec/tests/mathops.c
index d47f1442df..33a059cad8 100644
--- a/libavcodec/mathops-test.c
+++ b/libavcodec/tests/mathops.c
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "mathops.h"
+#include "libavcodec/mathops.h"
#include <stdlib.h>
diff --git a/libavcodec/motion-test.c b/libavcodec/tests/motion.c
index ebcf4aafa4..d89f9408c2 100644
--- a/libavcodec/motion-test.c
+++ b/libavcodec/tests/motion.c
@@ -28,7 +28,7 @@
#include <string.h>
#include "config.h"
-#include "me_cmp.h"
+#include "libavcodec/me_cmp.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "libavutil/mem.h"
diff --git a/libavcodec/options-test.c b/libavcodec/tests/options.c
index 0b064e64d4..7f0ee1d807 100644
--- a/libavcodec/options-test.c
+++ b/libavcodec/tests/options.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "options.c"
+#include "libavcodec/options.c"
static int dummy_init(AVCodecContext *ctx)
{
diff --git a/libavcodec/ppc/dct-test.c b/libavcodec/tests/ppc/dct.c
index 2328516ca4..d95db525af 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
diff --git a/libavcodec/rangecoder-test.c b/libavcodec/tests/rangecoder.c
index 2892949033..2da5c0ce33 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/snowenc-test.c b/libavcodec/tests/snowenc.c
index e1ed86f5c7..d5f94e8a61 100644
--- a/libavcodec/snowenc-test.c
+++ b/libavcodec/tests/snowenc.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "snowenc.c"
+#include "libavcodec/snowenc.c"
#undef malloc
#undef free
diff --git a/libavcodec/utils-test.c b/libavcodec/tests/utils.c
index 7b3b718bd1..e2891fb389 100644
--- a/libavcodec/utils-test.c
+++ b/libavcodec/tests/utils.c
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "avcodec.h"
+#include "libavcodec/avcodec.h"
int main(void){
AVCodec *codec = NULL;
diff --git a/libavcodec/x86/dct-test.c b/libavcodec/tests/x86/dct.c
index 28ede16670..b6cdfb346c 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"
#if (CONFIG_PRORES_DECODER || CONFIG_PRORES_LGPL_DECODER) && ARCH_X86_64 && HAVE_YASM
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
diff --git a/libavdevice/tests/.gitignore b/libavdevice/tests/.gitignore
new file mode 100644
index 0000000000..b4a2281a70
--- /dev/null
+++ b/libavdevice/tests/.gitignore
@@ -0,0 +1 @@
+/timefilter
diff --git a/libavdevice/timefilter-test.c b/libavdevice/tests/timefilter.c
index 39432d5ed7..7c1ed0a4b6 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..b605afa9cf
--- /dev/null
+++ b/libavfilter/tests/.gitignore
@@ -0,0 +1,3 @@
+/drawutils
+/filtfmts
+/formats
diff --git a/libavfilter/drawutils-test.c b/libavfilter/tests/drawutils.c
index 7b9f89f9d2..7fe53ddf31 100644
--- a/libavfilter/drawutils-test.c
+++ b/libavfilter/tests/drawutils.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include "libavutil/pixdesc.h"
-#include "drawutils.h"
+#include "libavfilter/drawutils.h"
int main(void)
{
diff --git a/libavfilter/filtfmts-test.c b/libavfilter/tests/filtfmts.c
index 46a2d9447d..46a2d9447d 100644
--- a/libavfilter/filtfmts-test.c
+++ b/libavfilter/tests/filtfmts.c
diff --git a/libavfilter/formats-test.c b/libavfilter/tests/formats.c
index a8916383e6..0e8ba4ad15 100644
--- a/libavfilter/formats-test.c
+++ b/libavfilter/tests/formats.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "formats.c"
+#include "libavfilter/formats.c"
#undef printf
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index ddac2d3df5..6252de88be 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1559,23 +1559,20 @@ static int mkv_write_header(AVFormatContext *s)
if ((tag = av_dict_get(s->metadata, "title", NULL, 0)))
put_ebml_string(pb, MATROSKA_ID_TITLE, tag->value);
if (!(s->flags & AVFMT_FLAG_BITEXACT)) {
+ uint32_t segment_uid[4];
+ AVLFG lfg;
+
+ av_lfg_init(&lfg, av_get_random_seed());
+
+ for (i = 0; i < 4; i++)
+ segment_uid[i] = av_lfg_get(&lfg);
+
put_ebml_string(pb, MATROSKA_ID_MUXINGAPP, LIBAVFORMAT_IDENT);
if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0)))
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value);
else
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
-
- if (mkv->mode != MODE_WEBM) {
- uint32_t segment_uid[4];
- AVLFG lfg;
-
- av_lfg_init(&lfg, av_get_random_seed());
-
- for (i = 0; i < 4; i++)
- segment_uid[i] = av_lfg_get(&lfg);
-
- put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
- }
+ put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
} else {
const char *ident = "Lavf";
put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , ident);
diff --git a/libavformat/tests/.gitignore b/libavformat/tests/.gitignore
new file mode 100644
index 0000000000..c8adb86892
--- /dev/null
+++ b/libavformat/tests/.gitignore
@@ -0,0 +1,6 @@
+/movenc
+/noproxy
+/rtmpdh
+/seek
+/srtp
+/url
diff --git a/libavformat/movenc-test.c b/libavformat/tests/movenc.c
index 6c7f0f6ab2..786f1dc24a 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 4524764cbf..782356c6cd 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 e86fb18f97..929b3f3ff2 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 904b435aaa..7ed56ba4ef 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 1198f592bc..89450cee8e 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 a1da82e493..1623179128 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 290ae947fd..8c377bae84 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/Makefile b/libavutil/Makefile
index a35deb6fec..1f05215ee5 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -221,4 +221,4 @@ TOOLS = crypto_bench ffhash ffeval ffescape
tools/crypto_bench$(EXESUF): ELIBS += $(if $(VERSUS),$(subst +, -l,+$(VERSUS)),)
tools/crypto_bench$(EXESUF): CFLAGS += -DUSE_EXT_LIBS=0$(if $(VERSUS),$(subst +,+USE_,+$(VERSUS)),)
-$(SUBDIR)lzo-test$(EXESUF): ELIBS = -llzo2
+$(SUBDIR)tests/lzo$(EXESUF): ELIBS = -llzo2
diff --git a/libavutil/des.c b/libavutil/des.c
index d375095273..6957666184 100644
--- a/libavutil/des.c
+++ b/libavutil/des.c
@@ -104,7 +104,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..c23c44b53b
--- /dev/null
+++ b/libavutil/tests/.gitignore
@@ -0,0 +1,44 @@
+/adler32
+/aes
+/atomic
+/avstring
+/base64
+/blowfish
+/bprint
+/camellia
+/cast5
+/color_utils
+/cpu
+/crc
+/des
+/dict
+/display
+/error
+/eval
+/fifo
+/file
+/float_dsp
+/hash
+/hmac
+/lfg
+/lls
+/log
+/lzo
+/md5
+/murmur3
+/opt
+/parseutils
+/pca
+/pixdesc
+/pixelutils
+/random_seed
+/rational
+/ripemd
+/sha
+/sha512
+/softfloat
+/tea
+/tree
+/twofish
+/utf8
+/xtea
diff --git a/libavutil/adler32-test.c b/libavutil/tests/adler32.c
index f93cf9d449..511bf1e401 100644
--- a/libavutil/adler32-test.c
+++ b/libavutil/tests/adler32.c
@@ -19,9 +19,9 @@
// LCOV_EXCL_START
#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 2bdba8ada2..1291ad6633 100644
--- a/libavutil/aes-test.c
+++ b/libavutil/tests/aes.c
@@ -19,10 +19,10 @@
// LCOV_EXCL_START
#include <string.h>
-#include "aes.h"
-#include "lfg.h"
-#include "log.h"
-#include "mem.h"
+#include "libavutil/aes.h"
+#include "libavutil/lfg.h"
+#include "libavutil/log.h"
+#include "libavutil/mem.h"
int main(int argc, char **argv)
{
diff --git a/libavutil/atomic-test.c b/libavutil/tests/atomic.c
index 397d8c9285..c92f220a7a 100644
--- a/libavutil/atomic-test.c
+++ b/libavutil/tests/atomic.c
@@ -16,8 +16,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "atomic.h"
-#include "avassert.h"
+#include "libavutil/atomic.h"
+#include "libavutil/avassert.h"
int main(void)
{
diff --git a/libavutil/avstring-test.c b/libavutil/tests/avstring.c
index 3e29661e96..1242b3fe8d 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 19ecd2bee1..88fd55c220 100644
--- a/libavutil/base64-test.c
+++ b/libavutil/tests/base64.c
@@ -20,9 +20,9 @@
#include <stdint.h>
#include <stdio.h>
-#include "common.h"
-#include "base64.h"
-#include "timer.h"
+#include "libavutil/common.h"
+#include "libavutil/base64.h"
+#include "libavutil/timer.h"
#define MAX_DATA_SIZE 1024
#define MAX_ENCODED_SIZE 2048
diff --git a/libavutil/blowfish-test.c b/libavutil/tests/blowfish.c
index 3ad7cd7665..2c2e004830 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/bprint-test.c b/libavutil/tests/bprint.c
index f081c4485e..d7f381dd52 100644
--- a/libavutil/bprint-test.c
+++ b/libavutil/tests/bprint.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "bprint.c"
+#include "libavutil/bprint.c"
#undef printf
diff --git a/libavutil/camellia-test.c b/libavutil/tests/camellia.c
index 0540ccc15d..1716b59a38 100644
--- a/libavutil/camellia-test.c
+++ b/libavutil/tests/camellia.c
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "camellia.h"
-#include "log.h"
+#include "libavutil/camellia.h"
+#include "libavutil/log.h"
int main(int argc, char *argv[])
{
diff --git a/libavutil/cast5-test.c b/libavutil/tests/cast5.c
index e2269a767b..ce3aa80b5b 100644
--- a/libavutil/cast5-test.c
+++ b/libavutil/tests/cast5.c
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "cast5.h"
-#include "log.h"
+#include "libavutil/cast5.h"
+#include "libavutil/log.h"
int main(int argc, char** argv)
{
diff --git a/libavutil/color_utils-test.c b/libavutil/tests/color_utils.c
index 083872c3e4..ea0127158b 100644
--- a/libavutil/color_utils-test.c
+++ b/libavutil/tests/color_utils.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "color_utils.c"
+#include "libavutil/color_utils.c"
int main(int argc, char *argv[])
{
diff --git a/libavutil/cpu-test.c b/libavutil/tests/cpu.c
index 35e7631eaa..f02a54cbbb 100644
--- a/libavutil/cpu-test.c
+++ b/libavutil/tests/cpu.c
@@ -19,8 +19,9 @@
#include <stdio.h>
#include "config.h"
-#include "cpu.h"
-#include "avstring.h"
+
+#include "libavutil/cpu.h"
+#include "libavutil/avstring.h"
#if HAVE_UNISTD_H
#include <unistd.h>
diff --git a/libavutil/crc-test.c b/libavutil/tests/crc.c
index 199aea1ef9..9825d6bec9 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 99453af6a7..ed04fad519 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/dict-test.c b/libavutil/tests/dict.c
index e40b57885f..0039ba5ff9 100644
--- a/libavutil/dict-test.c
+++ b/libavutil/tests/dict.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "dict.c"
+#include "libavutil/dict.c"
static void print_dict(const AVDictionary *m)
{
diff --git a/libavutil/display-test.c b/libavutil/tests/display.c
index b42ab893a8..893ebb5543 100644
--- a/libavutil/display-test.c
+++ b/libavutil/tests/display.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "display.c"
+#include "libavutil/display.c"
static void print_matrix(int32_t matrix[9])
{
diff --git a/libavutil/error-test.c b/libavutil/tests/error.c
index 36240daa4e..16efc8ac45 100644
--- a/libavutil/error-test.c
+++ b/libavutil/tests/error.c
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "error.c"
+#include "libavutil/error.c"
#undef printf
diff --git a/libavutil/eval-test.c b/libavutil/tests/eval.c
index 17a63cc25d..2a1afcc4dc 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 71a9172a45..e4d7edf212 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/file-test.c b/libavutil/tests/file.c
index 0324081fb9..3608bcccbe 100644
--- a/libavutil/file-test.c
+++ b/libavutil/tests/file.c
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "file.c"
+#include "libavutil/file.c"
#undef printf
diff --git a/libavutil/float_dsp-test.c b/libavutil/tests/float_dsp.c
index 9963efb32c..053324dd38 100644
--- a/libavutil/float_dsp-test.c
+++ b/libavutil/tests/float_dsp.c
@@ -30,13 +30,13 @@
#include "compat/getopt.c"
#endif
-#include "common.h"
-#include "cpu.h"
-#include "internal.h"
-#include "lfg.h"
-#include "log.h"
-#include "random_seed.h"
-#include "float_dsp.h"
+#include "libavutil/common.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/hash-test.c b/libavutil/tests/hash.c
index bb7edf592b..4f2ad52ad6 100644
--- a/libavutil/hash-test.c
+++ b/libavutil/tests/hash.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <string.h>
-#include "hash.h"
+#include "libavutil/hash.h"
#define SRC_BUF_SIZE 64
#define DST_BUF_SIZE (AV_HASH_MAX_SIZE * 8)
diff --git a/libavutil/hmac-test.c b/libavutil/tests/hmac.c
index 925f3dfef6..5eeb63ce05 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 2b6f3828dc..1425e026b4 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 12215c5257..965b0f458d 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/log-test.c b/libavutil/tests/log.c
index 14d476436f..8fe9461c1b 100644
--- a/libavutil/log-test.c
+++ b/libavutil/tests/log.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "log.c"
+#include "libavutil/log.c"
#include <string.h>
diff --git a/libavutil/lzo-test.c b/libavutil/tests/lzo.c
index e28fbe53fc..0147ab5c1d 100644
--- a/libavutil/lzo-test.c
+++ b/libavutil/tests/lzo.c
@@ -20,9 +20,11 @@
#include <stdio.h>
#include <lzo/lzo1x.h>
-#include "log.h"
-#include "lzo.h"
-#include "mem.h"
+
+#include "libavutil/log.h"
+#include "libavutil/lzo.h"
+#include "libavutil/mem.h"
+
#define MAXSZ (10*1024*1024)
/* Define one of these to 1 if you wish to benchmark liblzo
diff --git a/libavutil/md5-test.c b/libavutil/tests/md5.c
index 547f74b880..42e4538e0a 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/murmur3-test.c b/libavutil/tests/murmur3.c
index edc7a18bbe..b8d6b1feee 100644
--- a/libavutil/murmur3-test.c
+++ b/libavutil/tests/murmur3.c
@@ -18,9 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "intreadwrite.h"
-#include "mem.h"
-#include "murmur3.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
+#include "libavutil/murmur3.h"
int main(void)
{
diff --git a/libavutil/opt-test.c b/libavutil/tests/opt.c
index e41782bacf..568eb45668 100644
--- a/libavutil/opt-test.c
+++ b/libavutil/tests/opt.c
@@ -19,14 +19,14 @@
#include <limits.h>
#include <stdio.h>
-#include "common.h"
-#include "channel_layout.h"
-#include "error.h"
-#include "log.h"
-#include "mem.h"
-#include "rational.h"
-#include "opt.h"
-#include "pixdesc.h"
+#include "libavutil/common.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/error.h"
+#include "libavutil/log.h"
+#include "libavutil/mem.h"
+#include "libavutil/rational.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
typedef struct TestContext {
const AVClass *class;
diff --git a/libavutil/parseutils-test.c b/libavutil/tests/parseutils.c
index fa9c1c1d05..682b3907cf 100644
--- a/libavutil/parseutils-test.c
+++ b/libavutil/tests/parseutils.c
@@ -17,14 +17,14 @@
*/
#define TEST
-#include "parseutils.c"
+#include "libavutil/parseutils.c"
#include <stdint.h>
#include <stdio.h>
-#include "common.h"
-#include "log.h"
-#include "rational.h"
+#include "libavutil/common.h"
+#include "libavutil/log.h"
+#include "libavutil/rational.h"
static uint32_t randomv = MKTAG('L','A','V','U');
diff --git a/libavutil/pca-test.c b/libavutil/tests/pca.c
index e56d6185b1..2d9eb8f56a 100644
--- a/libavutil/pca-test.c
+++ b/libavutil/tests/pca.c
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "pca.c"
-#include "lfg.h"
+#include "libavutil/pca.c"
+#include "libavutil/lfg.h"
#undef printf
#include <stdio.h>
diff --git a/libavutil/pixdesc-test.c b/libavutil/tests/pixdesc.c
index cd7d4c5f7b..7fbfeea96c 100644
--- a/libavutil/pixdesc-test.c
+++ b/libavutil/tests/pixdesc.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "pixdesc.c"
+#include "libavutil/pixdesc.c"
int main(void){
int i;
diff --git a/libavutil/pixelutils-test.c b/libavutil/tests/pixelutils.c
index eebc524c87..ec4dc8fe8f 100644
--- a/libavutil/pixelutils-test.c
+++ b/libavutil/tests/pixelutils.c
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "pixelutils.c"
+#include "libavutil/pixelutils.c"
#define W1 320
#define H1 240
diff --git a/libavutil/random_seed-test.c b/libavutil/tests/random_seed.c
index 182c8a6dd6..ebe9b3e7dd 100644
--- a/libavutil/random_seed-test.c
+++ b/libavutil/tests/random_seed.c
@@ -19,7 +19,7 @@
*/
#define TEST 1
-#include "random_seed.c"
+#include "libavutil/random_seed.c"
#undef printf
#define N 256
diff --git a/libavutil/rational-test.c b/libavutil/tests/rational.c
index 455d9c42b2..caec07d7cb 100644
--- a/libavutil/rational-test.c
+++ b/libavutil/tests/rational.c
@@ -19,9 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "rational.c"
-
-#include "integer.h"
+#include "libavutil/rational.c"
+#include "libavutil/integer.h"
int main(void)
{
diff --git a/libavutil/ripemd-test.c b/libavutil/tests/ripemd.c
index 2a60bbe613..58e5fce344 100644
--- a/libavutil/ripemd-test.c
+++ b/libavutil/tests/ripemd.c
@@ -21,8 +21,8 @@
#include <stdio.h>
-#include "mem.h"
-#include "ripemd.h"
+#include "libavutil/mem.h"
+#include "libavutil/ripemd.h"
int main(void)
{
diff --git a/libavutil/sha-test.c b/libavutil/tests/sha.c
index 7af2c04c69..a95b3a001f 100644
--- a/libavutil/sha-test.c
+++ b/libavutil/tests/sha.c
@@ -18,8 +18,8 @@
#include <stdio.h>
-#include "mem.h"
-#include "sha.h"
+#include "libavutil/mem.h"
+#include "libavutil/sha.h"
int main(void)
{
diff --git a/libavutil/sha512-test.c b/libavutil/tests/sha512.c
index 32ff50862e..f3b90fdf49 100644
--- a/libavutil/sha512-test.c
+++ b/libavutil/tests/sha512.c
@@ -23,8 +23,8 @@
#include <stdio.h>
-#include "mem.h"
-#include "sha512.h"
+#include "libavutil/mem.h"
+#include "libavutil/sha512.h"
int main(void)
{
diff --git a/libavutil/softfloat-test.c b/libavutil/tests/softfloat.c
index 3293450df8..16788d4da9 100644
--- a/libavutil/softfloat-test.c
+++ b/libavutil/tests/softfloat.c
@@ -19,9 +19,10 @@
*/
#include <inttypes.h>
-#include "softfloat.h"
-#include "common.h"
-#include "log.h"
+
+#include "libavutil/softfloat.h"
+#include "libavutil/common.h"
+#include "libavutil/log.h"
#include <stdio.h>
diff --git a/libavutil/tea-test.c b/libavutil/tests/tea.c
index 9bf059b980..605bb524af 100644
--- a/libavutil/tea-test.c
+++ b/libavutil/tests/tea.c
@@ -24,8 +24,8 @@
#include <stdio.h>
-#include "common.h"
-#include "tea.h"
+#include "libavutil/common.h"
+#include "libavutil/tea.h"
#define TEA_NUM_TESTS 4
diff --git a/libavutil/tree-test.c b/libavutil/tests/tree.c
index d1df0b6c87..7503228970 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/twofish-test.c b/libavutil/tests/twofish.c
index be0586a9a1..74e0926eaf 100644
--- a/libavutil/twofish-test.c
+++ b/libavutil/tests/twofish.c
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "log.h"
-#include "twofish.h"
+#include "libavutil/log.h"
+#include "libavutil/twofish.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/libavutil/utf8-test.c b/libavutil/tests/utf8.c
index 37a2802b5f..37a2802b5f 100644
--- a/libavutil/utf8-test.c
+++ b/libavutil/tests/utf8.c
diff --git a/libavutil/xtea-test.c b/libavutil/tests/xtea.c
index e8f39150d9..a974600a25 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 5bfa796ef1..ae2d3f22ab 100644
--- a/library.mak
+++ b/library.mak
@@ -53,11 +53,12 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
endif
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/libswresample/tests/.gitignore b/libswresample/tests/.gitignore
new file mode 100644
index 0000000000..2dc986bd0e
--- /dev/null
+++ b/libswresample/tests/.gitignore
@@ -0,0 +1 @@
+/swresample
diff --git a/libswresample/swresample-test.c b/libswresample/tests/swresample.c
index 0aa47c8d28..9ba7735d16 100644
--- a/libswresample/swresample-test.c
+++ b/libswresample/tests/swresample.c
@@ -23,7 +23,8 @@
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
-#include "swresample.h"
+
+#include "libswresample/swresample.h"
#undef time
#include "time.h"
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 f6e0c920cd..d1eddc82bf 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/swscale.h"
+#include "libswscale/rgb2rgb.h"
+
#define SIZE 1000
#define srcByte 0x55
#define dstByte 0xBB
diff --git a/libswscale/swscale-test.c b/libswscale/tests/swscale.c
index 4d8d08bd1a..58c211453a 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 3d58080d6d..c898695033 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -221,7 +221,7 @@ pixfmts(){
prefilter_chain=$2
nframes=${3:-1}
- showfiltfmts="$target_exec $target_path/libavfilter/filtfmts-test"
+ showfiltfmts="$target_exec $target_path/libavfilter/tests/filtfmts"
scale_exclude_fmts=${outfile}_scale_exclude_fmts
scale_in_fmts=${outfile}_scale_in_fmts
scale_out_fmts=${outfile}_scale_out_fmts
diff --git a/tests/fate/fft.mak b/tests/fate/fft.mak
index 244f426b49..f42dded247 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
@@ -60,13 +60,13 @@ endef
$(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED32,$(N))))
-fate-fft-fixed32-test: $(FATE_FFT_FIXED32)
-$(FATE_FFT_FIXED32): libavcodec/fft-fixed32-test$(EXESUF)
-$(FATE_FFT_FIXED32): CMD = run libavcodec/fft-fixed32-test $(CPUFLAGS:%=-c%) $(ARGS)
+fate-fft-fixed32: $(FATE_FFT_FIXED32)
+$(FATE_FFT_FIXED32): libavcodec/tests/fft-fixed32$(EXESUF)
+$(FATE_FFT_FIXED32): CMD = run libavcodec/tests/fft-fixed32 $(CPUFLAGS:%=-c%) $(ARGS)
$(FATE_FFT_FIXED32): REF = /dev/null
fate-dct: fate-dct-float
-fate-fft: fate-fft-float fate-fft-fixed fate-fft-fixed32-test
+fate-fft: fate-fft-float fate-fft-fixed fate-fft-fixed32
fate-mdct: fate-mdct-float fate-mdct-fixed
fate-rdft: fate-rdft-float
diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index 2bdb644b40..6fe2095cd1 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -174,8 +174,8 @@ fate-filter-hdcd: CMP = oneline
fate-filter-hdcd: REF = 5db465a58d2fd0d06ca944b883b33476
FATE_AFILTER-yes += fate-filter-formats
-fate-filter-formats: libavfilter/formats-test$(EXESUF)
-fate-filter-formats: CMD = run libavfilter/formats-test
+fate-filter-formats: libavfilter/tests/formats$(EXESUF)
+fate-filter-formats: CMD = run libavfilter/tests/formats
FATE_SAMPLES_AVCONV += $(FATE_AFILTER_SAMPLES-yes)
FATE_FFMPEG += $(FATE_AFILTER-yes)
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 4b17d593ee..00848028db 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -585,7 +585,7 @@ fate-filter-pixfmts-tinterlace_pad: CMD = pixfmts "pad"
FATE_FILTER_PIXFMTS-$(CONFIG_VFLIP_FILTER) += fate-filter-pixfmts-vflip
fate-filter-pixfmts-vflip: CMD = pixfmts
-$(FATE_FILTER_PIXFMTS-yes): libavfilter/filtfmts-test$(EXESUF)
+$(FATE_FILTER_PIXFMTS-yes): libavfilter/tests/filtfmts$(EXESUF)
FATE_FILTER_VSYNTH-$(CONFIG_FORMAT_FILTER) += $(FATE_FILTER_PIXFMTS-yes)
fate-filter-pixfmts: $(FATE_FILTER_PIXFMTS-yes)
diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak
index 5aba2ee7f4..cf252858de 100644
--- a/tests/fate/libavcodec.mak
+++ b/tests/fate/libavcodec.mak
@@ -1,46 +1,46 @@
FATE_LIBAVCODEC-$(CONFIG_CABAC) += fate-cabac
-fate-cabac: libavcodec/cabac-test$(EXESUF)
-fate-cabac: CMD = run libavcodec/cabac-test
+fate-cabac: libavcodec/tests/cabac$(EXESUF)
+fate-cabac: CMD = run libavcodec/tests/cabac
fate-cabac: REF = /dev/null
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-yes += fate-libavcodec-options
-fate-libavcodec-options: libavcodec/options-test$(EXESUF)
-fate-libavcodec-options: CMD = run libavcodec/options-test
+fate-libavcodec-options: libavcodec/tests/options$(EXESUF)
+fate-libavcodec-options: CMD = run libavcodec/tests/options
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
FATE_LIBAVCODEC-yes += fate-mathops
-fate-mathops: libavcodec/mathops-test$(EXESUF)
-fate-mathops: CMD = run libavcodec/mathops-test
+fate-mathops: libavcodec/tests/mathops$(EXESUF)
+fate-mathops: CMD = run libavcodec/tests/mathops
fate-mathops: CMP = null
fate-mathops: REF = /dev/null
FATE_LIBAVCODEC-$(CONFIG_JPEG2000_ENCODER) += fate-j2k-dwt
-fate-j2k-dwt: libavcodec/jpeg2000dwt-test$(EXESUF)
-fate-j2k-dwt: CMD = run libavcodec/jpeg2000dwt-test
+fate-j2k-dwt: libavcodec/tests/jpeg2000dwt$(EXESUF)
+fate-j2k-dwt: CMD = run libavcodec/tests/jpeg2000dwt
FATE_LIBAVCODEC-yes += fate-libavcodec-utils
-fate-libavcodec-utils: libavcodec/utils-test$(EXESUF)
-fate-libavcodec-utils: CMD = run libavcodec/utils-test
+fate-libavcodec-utils: libavcodec/tests/utils$(EXESUF)
+fate-libavcodec-utils: CMD = run libavcodec/tests/utils
fate-libavcodec-utils: CMP = null
fate-libavcodec-utils: 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 f88d6fa5b6..cf1ba189dd 100644
--- a/tests/fate/libavformat.mak
+++ b/tests/fate/libavformat.mak
@@ -1,26 +1,26 @@
#FATE_LIBAVFORMAT-$(HAVE_PTHREADS) += fate-async
-#fate-async: libavformat/async-test$(EXESUF)
-#fate-async: CMD = run libavformat/async-test
+#fate-async: libavformat/tests/async$(EXESUF)
+#fate-async: CMD = run libavformat/tests/async
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_LIBAVFORMAT += $(FATE_LIBAVFORMAT-yes)
FATE-$(CONFIG_AVFORMAT) += $(FATE_LIBAVFORMAT)
diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak
index 7f4fb7a87b..6fbad641b8 100644
--- a/tests/fate/libavutil.mak
+++ b/tests/fate/libavutil.mak
@@ -1,145 +1,145 @@
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-camellia
-fate-camellia: libavutil/camellia-test$(EXESUF)
-fate-camellia: CMD = run libavutil/camellia-test
+fate-camellia: libavutil/tests/camellia$(EXESUF)
+fate-camellia: CMD = run libavutil/tests/camellia
fate-camellia: REF = /dev/null
FATE_LIBAVUTIL += fate-cast5
-fate-cast5: libavutil/cast5-test$(EXESUF)
-fate-cast5: CMD = run libavutil/cast5-test
+fate-cast5: libavutil/tests/cast5$(EXESUF)
+fate-cast5: CMD = run libavutil/tests/cast5
fate-cast5: 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-bprint
-fate-bprint: libavutil/bprint-test$(EXESUF)
-fate-bprint: CMD = run libavutil/bprint-test
+fate-bprint: libavutil/tests/bprint$(EXESUF)
+fate-bprint: CMD = run libavutil/tests/bprint
FATE_LIBAVUTIL += fate-cpu
-fate-cpu: libavutil/cpu-test$(EXESUF)
-fate-cpu: CMD = runecho libavutil/cpu-test $(CPUFLAGS:%=-c%) $(THREADS:%=-t%)
+fate-cpu: libavutil/tests/cpu$(EXESUF)
+fate-cpu: CMD = runecho 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-color_utils
-fate-color_utils: libavutil/color_utils-test$(EXESUF)
-fate-color_utils: CMD = run libavutil/color_utils-test
+fate-color_utils: libavutil/tests/color_utils$(EXESUF)
+fate-color_utils: CMD = run libavutil/tests/color_utils
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-dict
-fate-dict: libavutil/dict-test$(EXESUF)
-fate-dict: CMD = run libavutil/dict-test
+fate-dict: libavutil/tests/dict$(EXESUF)
+fate-dict: CMD = run libavutil/tests/dict
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 $(CPUFLAGS:%=-c%)
+fate-float-dsp: libavutil/tests/float_dsp$(EXESUF)
+fate-float-dsp: CMD = run libavutil/tests/float_dsp $(CPUFLAGS:%=-c%)
fate-float-dsp: CMP = null
fate-float-dsp: REF = /dev/null
FATE_LIBAVUTIL += fate-hash
-fate-hash: libavutil/hash-test$(EXESUF)
-fate-hash: CMD = run libavutil/hash-test
+fate-hash: libavutil/tests/hash$(EXESUF)
+fate-hash: CMD = run libavutil/tests/hash
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-murmur3
-fate-murmur3: libavutil/murmur3-test$(EXESUF)
-fate-murmur3: CMD = run libavutil/murmur3-test
+fate-murmur3: libavutil/tests/murmur3$(EXESUF)
+fate-murmur3: CMD = run libavutil/tests/murmur3
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-$(CONFIG_PIXELUTILS) += fate-pixelutils
-fate-pixelutils: libavutil/pixelutils-test$(EXESUF)
-fate-pixelutils: CMD = run libavutil/pixelutils-test
+fate-pixelutils: libavutil/tests/pixelutils$(EXESUF)
+fate-pixelutils: CMD = run libavutil/tests/pixelutils
FATE_LIBAVUTIL += fate-display
-fate-display: libavutil/display-test$(EXESUF)
-fate-display: CMD = run libavutil/display-test
+fate-display: libavutil/tests/display$(EXESUF)
+fate-display: CMD = run libavutil/tests/display
FATE_LIBAVUTIL += fate-random_seed
-fate-random_seed: libavutil/random_seed-test$(EXESUF)
-fate-random_seed: CMD = run libavutil/random_seed-test
+fate-random_seed: libavutil/tests/random_seed$(EXESUF)
+fate-random_seed: CMD = run libavutil/tests/random_seed
FATE_LIBAVUTIL += fate-ripemd
-fate-ripemd: libavutil/ripemd-test$(EXESUF)
-fate-ripemd: CMD = run libavutil/ripemd-test
+fate-ripemd: libavutil/tests/ripemd$(EXESUF)
+fate-ripemd: CMD = run libavutil/tests/ripemd
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-sha512
-fate-sha512: libavutil/sha512-test$(EXESUF)
-fate-sha512: CMD = run libavutil/sha512-test
+fate-sha512: libavutil/tests/sha512$(EXESUF)
+fate-sha512: CMD = run libavutil/tests/sha512
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-twofish
-fate-twofish: libavutil/twofish-test$(EXESUF)
-fate-twofish: CMD = run libavutil/twofish-test
+fate-twofish: libavutil/tests/twofish$(EXESUF)
+fate-twofish: CMD = run libavutil/tests/twofish
fate-twofish: 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_LIBAVUTIL += fate-tea
-fate-tea: libavutil/tea-test$(EXESUF)
-fate-tea: CMD = run libavutil/tea-test
+fate-tea: libavutil/tests/tea$(EXESUF)
+fate-tea: CMD = run libavutil/tests/tea
FATE_LIBAVUTIL += fate-opt
-fate-opt: libavutil/opt-test$(EXESUF)
-fate-opt: CMD = run libavutil/opt-test
+fate-opt: libavutil/tests/opt$(EXESUF)
+fate-opt: CMD = run libavutil/tests/opt
FATE_LIBAVUTIL += $(FATE_LIBAVUTIL-yes)
FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL)
diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak
index 6e4df91309..f120f56774 100644
--- a/tests/fate/seek.mak
+++ b/tests/fate/seek.mak
@@ -245,13 +245,13 @@ FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%)
FATE_SEEK_EXTRA-$(CONFIG_MP3_DEMUXER) += fate-seek-extra-mp3
FATE_SEEK_EXTRA-$(call ALLYES, CACHE_PROTOCOL PIPE_PROTOCOL MP3_DEMUXER) += fate-seek-cache-pipe
-fate-seek-extra-mp3: CMD = run libavformat/seek-test$(EXESUF) $(TARGET_SAMPLES)/gapless/gapless.mp3 -fastseek 1
-fate-seek-cache-pipe: CMD = cat $(TARGET_SAMPLES)/gapless/gapless.mp3 | run libavformat/seek-test$(EXESUF) cache:pipe:0 -read_ahead_limit -1
+fate-seek-extra-mp3: CMD = run libavformat/tests/seek$(EXESUF) $(TARGET_SAMPLES)/gapless/gapless.mp3 -fastseek 1
+fate-seek-cache-pipe: CMD = cat $(TARGET_SAMPLES)/gapless/gapless.mp3 | run libavformat/tests/seek$(EXESUF) cache:pipe:0 -read_ahead_limit -1
FATE_SEEK_EXTRA += $(FATE_SEEK_EXTRA-yes)
-$(FATE_SEEK) $(FATE_SAMPLES_SEEK) $(FATE_SEEK_EXTRA): libavformat/seek-test$(EXESUF)
-$(FATE_SEEK) $(FATE_SAMPLES_SEEK): CMD = run libavformat/seek-test$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC)
+$(FATE_SEEK) $(FATE_SAMPLES_SEEK) $(FATE_SEEK_EXTRA): libavformat/tests/seek$(EXESUF)
+$(FATE_SEEK) $(FATE_SAMPLES_SEEK): CMD = run libavformat/tests/seek$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC)
$(FATE_SEEK) $(FATE_SAMPLES_SEEK): fate-seek-%: fate-%
fate-seek-%: REF = $(SRC_PATH)/tests/ref/seek/$(@:fate-seek-%=%)