Browse Source

tests: Move all test programs to a subdirectory

Diego Biurrun 9 years ago
parent
commit
a6a750c7ef

+ 0 - 1
.gitignore

@@ -17,7 +17,6 @@
 *.so.*
 *.swp
 *.ver
-*-test
 /.config
 /.version
 /avconv

+ 3 - 4
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))

+ 1 - 1
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

+ 6 - 0
libavcodec/tests/.gitignore

@@ -0,0 +1,6 @@
+/dct
+/fft
+/fft-fixed
+/golomb
+/iirfilter
+/rangecoder

+ 1 - 1
libavcodec/arm/dct-test.c → 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 }

+ 12 - 11
libavcodec/dct-test.c → 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 } };

+ 1 - 1
libavcodec/fft-fixed-test.c → libavcodec/tests/fft-fixed.c

@@ -17,4 +17,4 @@
  */
 
 #define FFT_FLOAT 0
-#include "fft-test.c"
+#include "fft.c"

+ 3 - 3
libavcodec/fft-test.c → 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 */

+ 3 - 3
libavcodec/golomb-test.c → 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)

+ 1 - 1
libavcodec/iirfilter-test.c → 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

Some files were not shown because too many files changed in this diff