1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-26 16:45:12 -04:00

[tests] build_by_default: false for executables.

It does not work, but this as a meson issue.
This commit is contained in:
Witold Filipczyk 2022-10-07 19:01:19 +02:00
parent 917378f766
commit 6e83bbf23c
5 changed files with 28 additions and 23 deletions

View File

@ -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())

View File

@ -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)

View File

@ -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())

View File

@ -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)

View File

@ -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)