diff --git a/src/cookies/meson.build b/src/cookies/meson.build index b6c864d5..1683e9b1 100644 --- a/src/cookies/meson.build +++ b/src/cookies/meson.build @@ -1,6 +1,6 @@ srcs += files('cookies.c', 'dialogs.c', 'path.c', 'parser.c') -executable('cookies-t', 'cookies-t.c', 'path.c', include_directories:['..']) +exe = executable('cookies-t', 'cookies-t.c', 'path.c', include_directories:['..'], build_by_default:false) test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'}) t = find_program('test-cookies-t') -test('cookies', t, env: test_lib, workdir: meson.current_build_dir()) +test('cookies', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir()) diff --git a/src/dom/test/meson.build b/src/dom/test/meson.build index 43b10e10..6f8a8642 100644 --- a/src/dom/test/meson.build +++ b/src/dom/test/meson.build @@ -1,4 +1,4 @@ -executable('html-mangle', 'html-mangle.c', +exe1 = executable('html-mangle', 'html-mangle.c', meson.source_root()+'/src/dom/configuration.c', meson.source_root()+'/src/dom/node.c', meson.source_root()+'/src/dom/select.c', @@ -6,9 +6,10 @@ meson.source_root()+'/src/dom/stack.c', meson.source_root()+'/src/dom/scanner.c', meson.source_root()+'/src/dom/css/scanner.c', testdeps, -c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '../..', '../../..']) +c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '../..', '../../..'], +build_by_default:false) -executable('sgml-parser', 'sgml-parser.c', +exe2 = executable('sgml-parser', 'sgml-parser.c', meson.source_root()+'/src/dom/configuration.c', meson.source_root()+'/src/dom/node.c', meson.source_root()+'/src/dom/select.c', @@ -25,7 +26,8 @@ meson.source_root()+'/src/dom/sgml/html/html.c', meson.source_root()+'/src/dom/sgml/rss/rss.c', meson.source_root()+'/src/dom/sgml/xbel/xbel.c', testdeps, -c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '../..', '../../..']) +c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '../..', '../../..'], +build_by_default:false) test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'}) @@ -38,11 +40,11 @@ t6 = find_program('test-sgml-parser-incremental') t7 = find_program('test-sgml-parser-lines') t8 = find_program('test-sgml-parser-random') -test('dom-configuration-basic', t1, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) -test('sgml-dump-basic', t2, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) -test('sgml-parser-basic', t3, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) -test('sgml-parser-error', t4, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) -test('sgml-parser-incomplete', t5, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) -test('sgml-parser-incremental', t6, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false, should_fail: true) -test('sgml-parser-lines', t7, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) -test('sgml-parser-random', t8, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false, should_fail: true) +test('dom-configuration-basic', t1, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) +test('sgml-dump-basic', t2, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) +test('sgml-parser-basic', t3, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) +test('sgml-parser-error', t4, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) +test('sgml-parser-incomplete', t5, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) +test('sgml-parser-incremental', t6, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false, should_fail:true) +test('sgml-parser-lines', t7, depends:[exe2], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) +test('sgml-parser-random', t8, depends:[exe1], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false, should_fail:true) diff --git a/src/mime/backend/meson.build b/src/mime/backend/meson.build index 054774bc..0aeb8bfa 100644 --- a/src/mime/backend/meson.build +++ b/src/mime/backend/meson.build @@ -10,7 +10,9 @@ endif srcs += files('common.c', 'default.c') -executable('mailcap-cache', 'common.c', 'mailcap.c', meson.source_root()+'/src/osdep/osdep.c', testdeps, c_args:['-DHAVE_CONFIG_H', '-DTEST_MAILCAP'], include_directories:['.','..','../..','../../..']) +exe = executable('mailcap-cache', 'common.c', 'mailcap.c', meson.source_root()+'/src/osdep/osdep.c', testdeps, +c_args:['-DHAVE_CONFIG_H', '-DTEST_MAILCAP'], include_directories:['.','..','../..','../../..'], +build_by_default:false) test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'}) t = find_program('test-mailcap-cache') -test('mailcap-cache', t, env: test_lib, workdir: meson.current_build_dir()) +test('mailcap-cache', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir()) diff --git a/src/protocol/ftp/meson.build b/src/protocol/ftp/meson.build index 4078ac66..2303b003 100644 --- a/src/protocol/ftp/meson.build +++ b/src/protocol/ftp/meson.build @@ -1,8 +1,9 @@ srcs += files('ftp.c', 'parse.c') -executable('ftp-parser', 'ftp-parser.c', 'parse.c', meson.source_root()+'/src/protocol/date.c', testdeps, -c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.','../..','../../..']) +exe = executable('ftp-parser', 'ftp-parser.c', 'parse.c', meson.source_root()+'/src/protocol/date.c', testdeps, +c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.','../..','../../..'], +build_by_default:false) test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'}) t = find_program('test-ftp-parser') -test('ftp-parser', t, env: test_lib, workdir: meson.current_build_dir(), is_parallel: false) +test('ftp-parser', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir(), is_parallel:false) diff --git a/src/protocol/test/meson.build b/src/protocol/test/meson.build index 13613473..d1795f8d 100644 --- a/src/protocol/test/meson.build +++ b/src/protocol/test/meson.build @@ -1,5 +1,5 @@ idna_dep = dependency('libidn') -executable('uri-test', 'uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c', +exe = executable('uri-test', 'uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c', meson.source_root()+'/src/intl/gettext/bindtextdom.c', meson.source_root()+'/src/intl/gettext/dcgettext.c', meson.source_root()+'/src/intl/gettext/dcigettext.c', @@ -21,8 +21,8 @@ meson.source_root()+'/src/intl/gettext/textdomain.c', testdeps, dependencies: [idna_dep], c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) t = find_program('test-normalize-uri') -test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'}) -test('normalize-uri', t, env: test_lib, workdir: meson.current_build_dir()) +test_lib = environment({'TEST_LIB':meson.source_root()+'/test/libtest.sh'}) +test('normalize-uri', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir()) t2 = find_program('test-get-translated-uri') -test('get-translated-uri', t2, env: test_lib, workdir: meson.current_build_dir(), should_fail: false) +test('get-translated-uri', t2, depends:[exe], env:test_lib, workdir:meson.current_build_dir(), should_fail:false)