tests: move examples and tests to subfolders
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Tue, 8 Oct 2019 19:19:06 +0000 (12:19 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 16 Oct 2019 19:48:24 +0000 (12:48 -0700)
This makes way for adding unit (check) tests.

42 files changed:
meson.build
tests/examples/meson.build [moved from tests/elements/meson.build with 100% similarity]
tests/examples/test-roi.c [moved from tests/elements/test-roi.c with 100% similarity]
tests/examples/test-vaapicontext.c [moved from tests/elements/test-vaapicontext.c with 100% similarity]
tests/examples/test-vaapipostproc.c [moved from tests/elements/test-vaapipostproc.c with 100% similarity]
tests/examples/test-vaapisink.c [moved from tests/elements/test-vaapisink.c with 100% similarity]
tests/internal/codec.c [moved from tests/codec.c with 100% similarity]
tests/internal/codec.h [moved from tests/codec.h with 100% similarity]
tests/internal/decoder.c [moved from tests/decoder.c with 100% similarity]
tests/internal/decoder.h [moved from tests/decoder.h with 100% similarity]
tests/internal/image.c [moved from tests/image.c with 100% similarity]
tests/internal/image.h [moved from tests/image.h with 100% similarity]
tests/internal/meson.build [new file with mode: 0644]
tests/internal/output.c [moved from tests/output.c with 100% similarity]
tests/internal/output.h [moved from tests/output.h with 100% similarity]
tests/internal/simple-decoder.c [moved from tests/simple-decoder.c with 100% similarity]
tests/internal/simple-encoder.c [moved from tests/simple-encoder.c with 100% similarity]
tests/internal/test-decode.c [moved from tests/test-decode.c with 100% similarity]
tests/internal/test-decode.h [moved from tests/test-decode.h with 100% similarity]
tests/internal/test-display.c [moved from tests/test-display.c with 100% similarity]
tests/internal/test-fei-enc-in.c [moved from tests/test-fei-enc-in.c with 100% similarity]
tests/internal/test-fei-enc-out.c [moved from tests/test-fei-enc-out.c with 100% similarity]
tests/internal/test-filter.c [moved from tests/test-filter.c with 100% similarity]
tests/internal/test-h264.c [moved from tests/test-h264.c with 100% similarity]
tests/internal/test-h264.h [moved from tests/test-h264.h with 100% similarity]
tests/internal/test-jpeg.c [moved from tests/test-jpeg.c with 100% similarity]
tests/internal/test-jpeg.h [moved from tests/test-jpeg.h with 100% similarity]
tests/internal/test-mpeg2.c [moved from tests/test-mpeg2.c with 100% similarity]
tests/internal/test-mpeg2.h [moved from tests/test-mpeg2.h with 100% similarity]
tests/internal/test-mpeg4.c [moved from tests/test-mpeg4.c with 100% similarity]
tests/internal/test-mpeg4.h [moved from tests/test-mpeg4.h with 100% similarity]
tests/internal/test-subpicture-data.c [moved from tests/test-subpicture-data.c with 100% similarity]
tests/internal/test-subpicture-data.h [moved from tests/test-subpicture-data.h with 100% similarity]
tests/internal/test-subpicture.c [moved from tests/test-subpicture.c with 100% similarity]
tests/internal/test-surfaces.c [moved from tests/test-surfaces.c with 100% similarity]
tests/internal/test-textures.c [moved from tests/test-textures.c with 100% similarity]
tests/internal/test-vc1.c [moved from tests/test-vc1.c with 100% similarity]
tests/internal/test-vc1.h [moved from tests/test-vc1.h with 100% similarity]
tests/internal/test-windows.c [moved from tests/test-windows.c with 100% similarity]
tests/internal/y4mreader.c [moved from tests/y4mreader.c with 100% similarity]
tests/internal/y4mreader.h [moved from tests/y4mreader.h with 100% similarity]
tests/meson.build

index 4ef6881..827dc27 100644 (file)
@@ -164,9 +164,7 @@ libsinc = include_directories('gst-libs')
 
 subdir('gst-libs')
 subdir('gst')
-if not get_option('examples').disabled()
-  subdir('tests')
-endif
+subdir('tests')
 subdir('docs')
 
 python3 = import('python').find_installation()
similarity index 100%
rename from tests/codec.c
rename to tests/internal/codec.c
similarity index 100%
rename from tests/codec.h
rename to tests/internal/codec.h
similarity index 100%
rename from tests/decoder.c
rename to tests/internal/decoder.c
similarity index 100%
rename from tests/decoder.h
rename to tests/internal/decoder.h
similarity index 100%
rename from tests/image.c
rename to tests/internal/image.c
similarity index 100%
rename from tests/image.h
rename to tests/internal/image.h
diff --git a/tests/internal/meson.build b/tests/internal/meson.build
new file mode 100644 (file)
index 0000000..a118d38
--- /dev/null
@@ -0,0 +1,81 @@
+libdecutils_sources = [
+  'decoder.c',
+  'test-h264.c',
+  'test-jpeg.c',
+  'test-mpeg2.c',
+  'test-mpeg4.c',
+  'test-vc1.c',
+]
+
+libdecutils_headers = [
+  'decoder.h',
+  'test-h264.h',
+  'test-jpeg.h',
+  'test-mpeg2.h',
+  'test-mpeg4.h',
+  'test-vc1.h',
+]
+
+libutils_sources = [
+  'codec.c',
+  'image.c',
+  'output.c',
+  'test-subpicture-data.c',
+  'y4mreader.c',
+]
+
+libutils_headers = [
+  'codec.h',
+  'image.h',
+  'output.h',
+  'test-subpicture-data.h',
+  'y4mreader.h',
+]
+
+test_examples = [
+  'simple-decoder',
+  'test-decode',
+  'test-display',
+  'test-filter',
+  'test-surfaces',
+  'test-windows',
+  'test-subpicture',
+]
+
+if USE_ENCODERS
+  test_examples += [ 'simple-encoder' ]
+endif
+
+if USE_H264_FEI_ENCODER
+  test_examples += [
+    'test-fei-enc-out',
+    'test-fei-enc-in',
+  ]
+endif
+
+if USE_GLX
+  test_examples += [ 'test-textures' ]
+endif
+
+libutils = static_library('libutils',
+  libutils_sources + libutils_headers,
+  c_args : gstreamer_vaapi_args,
+  include_directories: [configinc, libsinc],
+  dependencies : gstlibvaapi_deps,
+  install: false)
+
+libdecutils = static_library('libdecutils',
+  libdecutils_sources + libdecutils_headers,
+  c_args : gstreamer_vaapi_args,
+  include_directories: [configinc, libsinc],
+  dependencies : gstlibvaapi_deps,
+  install: false)
+
+foreach example : test_examples
+  executable(example, '@0@.c'.format(example),
+    c_args : gstreamer_vaapi_args,
+    include_directories: [configinc, libsinc],
+    dependencies : [gst_dep, libva_dep,  gstlibvaapi_dep],
+    link_with: [libutils, libdecutils],
+    install: false)
+endforeach
similarity index 100%
rename from tests/output.c
rename to tests/internal/output.c
similarity index 100%
rename from tests/output.h
rename to tests/internal/output.h
similarity index 100%
rename from tests/test-h264.c
rename to tests/internal/test-h264.c
similarity index 100%
rename from tests/test-h264.h
rename to tests/internal/test-h264.h
similarity index 100%
rename from tests/test-jpeg.c
rename to tests/internal/test-jpeg.c
similarity index 100%
rename from tests/test-jpeg.h
rename to tests/internal/test-jpeg.h
similarity index 100%
rename from tests/test-vc1.c
rename to tests/internal/test-vc1.c
similarity index 100%
rename from tests/test-vc1.h
rename to tests/internal/test-vc1.h
similarity index 100%
rename from tests/y4mreader.c
rename to tests/internal/y4mreader.c
similarity index 100%
rename from tests/y4mreader.h
rename to tests/internal/y4mreader.h
index 2bc2410..b27c0da 100644 (file)
@@ -1,83 +1,4 @@
-libdecutils_sources = [
-  'decoder.c',
-  'test-h264.c',
-  'test-jpeg.c',
-  'test-mpeg2.c',
-  'test-mpeg4.c',
-  'test-vc1.c',
-]
-
-libdecutils_headers = [
-  'decoder.h',
-  'test-h264.h',
-  'test-jpeg.h',
-  'test-mpeg2.h',
-  'test-mpeg4.h',
-  'test-vc1.h',
-]
-
-libutils_sources = [
-  'codec.c',
-  'image.c',
-  'output.c',
-  'test-subpicture-data.c',
-  'y4mreader.c',
-]
-
-libutils_headers = [
-  'codec.h',
-  'image.h',
-  'output.h',
-  'test-subpicture-data.h',
-  'y4mreader.h',
-]
-
-test_examples = [
-  'simple-decoder',
-  'test-decode',
-  'test-display',
-  'test-filter',
-  'test-surfaces',
-  'test-windows',
-  'test-subpicture',
-]
-
-if USE_ENCODERS
-  test_examples += [ 'simple-encoder' ]
+if not get_option('examples').disabled()
+  subdir('examples')
+  subdir('internal')
 endif
-
-if USE_H264_FEI_ENCODER
-  test_examples += [
-    'test-fei-enc-out',
-    'test-fei-enc-in',
-  ]
-endif
-
-if USE_GLX
-  test_examples += [ 'test-textures' ]
-endif
-
-libutils = static_library('libutils',
-  libutils_sources + libutils_headers,
-  c_args : gstreamer_vaapi_args,
-  include_directories: [configinc, libsinc],
-  dependencies : gstlibvaapi_deps,
-  install: false)
-
-libdecutils = static_library('libdecutils',
-  libdecutils_sources + libdecutils_headers,
-  c_args : gstreamer_vaapi_args,
-  include_directories: [configinc, libsinc],
-  dependencies : gstlibvaapi_deps,
-  install: false)
-
-foreach example : test_examples
-  executable(example, '@0@.c'.format(example),
-    c_args : gstreamer_vaapi_args,
-    include_directories: [configinc, libsinc],
-    dependencies : [gst_dep, libva_dep,  gstlibvaapi_dep],
-    link_with: [libutils, libdecutils],
-    install: false)
-endforeach
-
-subdir('elements')