[vlc-commits] [Git][videolan/vlc][master] 2 commits: meson: disable building all tests when the option says so

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Dec 2 09:46:12 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
726d7765 by Steve Lhomme at 2024-12-02T09:16:11+00:00
meson: disable building all tests when the option says so

Follow-up to 0e4be111590da80c4a695e4efc4a007eae604bc8.

- - - - -
e65b2754 by Steve Lhomme at 2024-12-02T09:16:11+00:00
meson: fix indentation

- - - - -


3 changed files:

- modules/access/http/meson.build
- modules/codec/meson.build
- modules/demux/meson.build


Changes:

=====================================
modules/access/http/meson.build
=====================================
@@ -25,66 +25,67 @@ vlc_http_lib = static_library('vlc_http',
     include_directories: [vlc_include_dirs],
 )
 
-#
-# Tests
-#
-hpack_test = executable('hpack_test',
-    files('hpack.c'),
-    c_args: ['-DDEC_TEST'],
-    include_directories: [vlc_include_dirs])
-hpackenc_test = executable('hpackenc_test',
-    files('hpack.c', 'hpackenc.c'),
-    c_args: ['-DENC_TEST'],
-    link_with: vlc_libcompat,
-    include_directories: [vlc_include_dirs])
-h2frame_test = executable('h2frame_test',
-    files(
-        'h2frame_test.c',
-        'hpack.c',
-        'hpackenc.c',
-        'h2frame.c',
-    ),
-    include_directories: [vlc_include_dirs])
-h2output_test = executable('h2output_test',
-    files('h2output_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-h2conn_test = executable('h2conn_test',
-    files('h2conn_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-h1conn_test = executable('h1conn_test',
-    files('h1conn_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-h1chunked_test = executable('h1chunked_test',
-    files('chunked_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-http_msg_test = executable('http_msg_test',
-    files('message_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-http_file_test = executable('http_file_test',
-    files('file_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-http_tunnel_test = executable('http_tunnel_test',
-    files('tunnel_test.c'),
-    link_with: vlc_http_lib,
-    include_directories: [vlc_include_dirs])
-
-test('http_hpack', hpack_test, suite: 'http')
-test('http_hpackenc', hpackenc_test, suite: 'http')
-test('http_h2frame_test', h2frame_test, suite: 'http')
-test('http_h2output_test', h2output_test, suite: 'http')
-test('http_h2conn_test', h2conn_test, suite: 'http')
-test('http_h1conn_test', h1conn_test, suite: 'http')
-test('http_h1chunked_test', h1chunked_test, suite: 'http')
-test('http_msg_test', http_msg_test, suite: 'http')
-test('http_file_test', http_file_test, suite: 'http')
-test('http_tunnel_test', http_tunnel_test, suite: 'http', timeout: 90)
+if (get_option('tests').allowed())
+    #
+    # Tests
+    #
+    hpack_test = executable('hpack_test',
+        files('hpack.c'),
+        c_args: ['-DDEC_TEST'],
+        include_directories: [vlc_include_dirs])
+    hpackenc_test = executable('hpackenc_test',
+        files('hpack.c', 'hpackenc.c'),
+        c_args: ['-DENC_TEST'],
+        link_with: vlc_libcompat,
+        include_directories: [vlc_include_dirs])
+    h2frame_test = executable('h2frame_test',
+        files(
+            'h2frame_test.c',
+            'hpack.c',
+            'hpackenc.c',
+            'h2frame.c',
+        ),
+        include_directories: [vlc_include_dirs])
+    h2output_test = executable('h2output_test',
+        files('h2output_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
+    h2conn_test = executable('h2conn_test',
+        files('h2conn_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
+    h1conn_test = executable('h1conn_test',
+        files('h1conn_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
+    h1chunked_test = executable('h1chunked_test',
+        files('chunked_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
+    http_msg_test = executable('http_msg_test',
+        files('message_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
+    http_file_test = executable('http_file_test',
+        files('file_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
+    http_tunnel_test = executable('http_tunnel_test',
+        files('tunnel_test.c'),
+        link_with: vlc_http_lib,
+        include_directories: [vlc_include_dirs])
 
+    test('http_hpack', hpack_test, suite: 'http')
+    test('http_hpackenc', hpackenc_test, suite: 'http')
+    test('http_h2frame_test', h2frame_test, suite: 'http')
+    test('http_h2output_test', h2output_test, suite: 'http')
+    test('http_h2conn_test', h2conn_test, suite: 'http')
+    test('http_h1conn_test', h1conn_test, suite: 'http')
+    test('http_h1chunked_test', h1chunked_test, suite: 'http')
+    test('http_msg_test', http_msg_test, suite: 'http')
+    test('http_file_test', http_file_test, suite: 'http')
+    test('http_tunnel_test', http_tunnel_test, suite: 'http', timeout: 90)
+endif
 
 #
 # HTTP(S) module


=====================================
modules/codec/meson.build
=====================================
@@ -409,20 +409,22 @@ if get_option('css_engine').require(flex.found() and bison.found(),
         webvtt_bison_files,
     ]
 
-    # CSS parser test
-    css_parser_test = executable('css_parser_test',
-        files(
-            'webvtt/css_test.c',
-            'webvtt/css_parser.c'
-        ),
-        webvtt_lex_files, webvtt_bison_files,
-        link_with: [vlc_libcompat],
-        dependencies: [libvlccore_dep],
-        include_directories: [
-            vlc_include_dirs,
-            include_directories('webvtt')])
+    if (get_option('tests').allowed())
+        # CSS parser test
+        css_parser_test = executable('css_parser_test',
+            files(
+                'webvtt/css_test.c',
+                'webvtt/css_parser.c'
+            ),
+            webvtt_lex_files, webvtt_bison_files,
+            link_with: [vlc_libcompat],
+            dependencies: [libvlccore_dep],
+            include_directories: [
+                vlc_include_dirs,
+                include_directories('webvtt')])
 
-    test('css_parser', css_parser_test, suite: 'css_parser')
+        test('css_parser', css_parser_test, suite: 'css_parser')
+    endif
 
 endif
 


=====================================
modules/demux/meson.build
=====================================
@@ -36,12 +36,14 @@ if ogg_dep.found()
     }
 endif
 
-# Xiph test
-xiph_test = executable('xiph_test',
-    files('xiph_test.c'),
-    include_directories: [vlc_include_dirs])
+if (get_option('tests').allowed())
+    # Xiph test
+    xiph_test = executable('xiph_test',
+        files('xiph_test.c'),
+        include_directories: [vlc_include_dirs])
 
-test('xiph_test', xiph_test, suite: 'demux')
+    test('xiph_test', xiph_test, suite: 'demux')
+endif
 
 # Demux dump
 vlc_modules += {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/38a9fa739a21e7370ef9d7b0efeda2330c3f68b5...e65b2754012af5b419c9078ca3a7a63a8f033676

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/38a9fa739a21e7370ef9d7b0efeda2330c3f68b5...e65b2754012af5b419c9078ca3a7a63a8f033676
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