[vlc-commits] [Git][videolan/vlc][master] 4 commits: Revert "meson: disable tests using alarm() on Windows"

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sun Oct 27 05:15:30 UTC 2024



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
9112601b by Steve Lhomme at 2024-10-27T05:03:08+00:00
Revert "meson: disable tests using alarm() on Windows"

This reverts commit d68acac58848e9af954b7995b059b2e0e811036b.

- - - - -
57c0cea2 by Steve Lhomme at 2024-10-27T05:03:08+00:00
meson: link chroma copy tests with compat

They use align_alloc().

- - - - -
f44cb4e6 by Steve Lhomme at 2024-10-27T05:03:08+00:00
meson: define chroma_copy tests with vlc_tests

- - - - -
0e4be111 by Steve Lhomme at 2024-10-27T05:03:08+00:00
meson: allow disabling building test executables

They should not be built when cross-compiling and we don't have an exe_wrapper.
They can't be run directly. They may be used on another machine, so it should be
possible to force it.

Disabled on Windows for now as we can't run them because they rely on alarm().

- - - - -


3 changed files:

- meson.build
- meson_options.txt
- modules/video_chroma/meson.build


Changes:

=====================================
meson.build
=====================================
@@ -1064,9 +1064,13 @@ subdir('bin')
 # VLC plugins
 subdir('modules')
 
-# Integration and non-regression tests, some unittest are there too but the
-# modules/, src/ and lib/ folders should be favoured for those.
-subdir('test')
+if (get_option('tests')
+    .disable_auto_if(host_system in ['windows'])
+    .allowed())
+    # Integration and non-regression tests, some unittest are there too but the
+    # modules/, src/ and lib/ folders should be favoured for those.
+    subdir('test')
+endif
 
 if get_option('rust').allowed()
     warning('''


=====================================
meson_options.txt
=====================================
@@ -5,6 +5,11 @@ option('vlc',
     value : true,
     description : 'Build the VLC executable program.')
 
+option('tests',
+    type : 'feature',
+    value : 'auto',
+    description : 'Build the VLC test executables.')
+
 option('nls',
     type : 'feature',
     value : 'auto',


=====================================
modules/video_chroma/meson.build
=====================================
@@ -129,24 +129,24 @@ vlc_modules += {
 
 ## Tests
 
-if host_system != 'windows' # can't use alarm
 # Chroma copy SSE test
-chroma_copy_sse_test = executable(
-    'chroma_copy_sse_test',
-    chroma_copy_lib_srcs,
-    c_args: ['-DCOPY_TEST'],
-    dependencies: [libvlccore_dep],
-    include_directories: [vlc_include_dirs]
-)
-test('chroma_copy_sse', chroma_copy_sse_test, suite: 'video_chroma')
+vlc_tests += {
+    'name': 'chroma_copy_sse_test',
+    'sources': chroma_copy_lib_srcs,
+    'suite' : ['video_chroma'],
+    'c_args': ['-DCOPY_TEST'],
+    'link_with': [vlc_libcompat],
+    'dependencies': [libvlccore_dep],
+    'include_directories': [vlc_include_dirs]
+}
 
 # Chroma copy test
-chroma_copy_test = executable(
-    'chroma_copy_test',
-    chroma_copy_lib_srcs,
-    c_args: ['-DCOPY_TEST', '-DCOPY_TEST_NOOPTIM'],
-    dependencies: [libvlccore_dep],
-    include_directories: [vlc_include_dirs]
-)
-test('chroma_copy', chroma_copy_test, suite: 'video_chroma')
-endif
+vlc_tests += {
+    'name': 'chroma_copy_test',
+    'sources': chroma_copy_lib_srcs,
+    'suite' : ['video_chroma'],
+    'c_args': ['-DCOPY_TEST', '-DCOPY_TEST_NOOPTIM'],
+    'link_with': [vlc_libcompat],
+    'dependencies': [libvlccore_dep],
+    'include_directories': [vlc_include_dirs]
+}



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f1a90394435471e75fee6f13383079a3d0272ec4...0e4be111590da80c4a695e4efc4a007eae604bc8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f1a90394435471e75fee6f13383079a3d0272ec4...0e4be111590da80c4a695e4efc4a007eae604bc8
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list