mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[meson] Do not build test programs by default
If you want run tests, pass -Dtest=true to meson and run "meson test" at the end.
This commit is contained in:
parent
c18525f481
commit
f03d1ea44d
@ -72,3 +72,4 @@ option('source-date-epoch', type: 'string', value: '', description: 'source date
|
|||||||
option('dgi', type: 'boolean', value: false, description: 'DOS Gateway Interface support')
|
option('dgi', type: 'boolean', value: false, description: 'DOS Gateway Interface support')
|
||||||
option('mujs', type: 'boolean', value: false, description: 'use mujs library')
|
option('mujs', type: 'boolean', value: false, description: 'use mujs library')
|
||||||
option('codepoint', type: 'boolean', value: true, description: 'whether check codepoints on Linux console')
|
option('codepoint', type: 'boolean', value: true, description: 'whether check codepoints on Linux console')
|
||||||
|
option('test', type: 'boolean', value: false, description: 'whether build test programs')
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
srcs += files('cookies.c', 'dialogs.c', 'path.c', 'parser.c')
|
srcs += files('cookies.c', 'dialogs.c', 'path.c', 'parser.c')
|
||||||
|
|
||||||
exe = executable('cookies-t', 'cookies-t.c', 'path.c', include_directories:['..'], build_by_default:false)
|
if get_option('test')
|
||||||
test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'})
|
exe = executable('cookies-t', 'cookies-t.c', 'path.c', include_directories:['..'], build_by_default:false)
|
||||||
t = find_program('test-cookies-t')
|
test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'})
|
||||||
test('cookies', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir())
|
t = find_program('test-cookies-t')
|
||||||
|
test('cookies', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir())
|
||||||
|
|
||||||
parsetstdeps = files('parser.c', 'parsetst.c')
|
parsetstdeps = files('parser.c', 'parsetst.c')
|
||||||
|
|
||||||
executable('parsetst', parsetstdeps, testdeps, dependencies:[iconvdeps], c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..'])
|
executable('parsetst', parsetstdeps, testdeps, dependencies:[iconvdeps], c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..'])
|
||||||
|
endif
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
subdir('parser')
|
subdir('parser')
|
||||||
subdir('test')
|
if get_option('test')
|
||||||
|
subdir('test')
|
||||||
|
endif
|
||||||
srcs += files('frames.c', 'iframes.c', 'parse-meta-refresh.c', 'parser.c', 'renderer.c', 'tables.c')
|
srcs += files('frames.c', 'iframes.c', 'parse-meta-refresh.c', 'parser.c', 'renderer.c', 'tables.c')
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
subdir('css')
|
subdir('css')
|
||||||
subdir('sgml')
|
subdir('sgml')
|
||||||
srcs += files('configuration.c', 'node.c', 'select.c', 'stack.c', 'scanner.c')
|
srcs += files('configuration.c', 'node.c', 'select.c', 'stack.c', 'scanner.c')
|
||||||
subdir('test')
|
|
||||||
|
if get_option('test')
|
||||||
|
subdir('test')
|
||||||
|
endif
|
||||||
|
@ -28,6 +28,7 @@ meson.source_root()+'/src/dom/sgml/xbel/xbel.c',
|
|||||||
testdeps,
|
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)
|
build_by_default:false)
|
||||||
|
endif
|
||||||
|
|
||||||
test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'})
|
test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'})
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ endif
|
|||||||
|
|
||||||
srcs += files('common.c', 'default.c')
|
srcs += files('common.c', 'default.c')
|
||||||
|
|
||||||
if conf_data.get('CONFIG_MAILCAP')
|
if conf_data.get('CONFIG_MAILCAP') and get_option('test')
|
||||||
mailcap_cache_files = files('common.c', 'mailcap.c', meson.source_root()+'/src/osdep/osdep.c')
|
mailcap_cache_files = files('common.c', 'mailcap.c', meson.source_root()+'/src/osdep/osdep.c')
|
||||||
|
|
||||||
if conf_data.get('CONFIG_NLS') and not conf_data.get('CONFIG_GETTEXT')
|
if conf_data.get('CONFIG_NLS') and not conf_data.get('CONFIG_GETTEXT')
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
srcs += files('match-hostname.c', 'ssl.c', 'socket.c')
|
srcs += files('match-hostname.c', 'ssl.c', 'socket.c')
|
||||||
subdir('test')
|
if get_option('test')
|
||||||
|
subdir('test')
|
||||||
|
endif
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
srcs += files('ftp.c', 'parse.c')
|
srcs += files('ftp.c', 'parse.c')
|
||||||
|
|
||||||
exe = executable('ftp-parser', 'ftp-parser.c', 'parse.c', meson.source_root()+'/src/protocol/date.c', testdeps, dependencies:[iconvdeps],
|
if get_option('test')
|
||||||
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, dependencies:[iconvdeps],
|
||||||
build_by_default:false)
|
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'})
|
test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'})
|
||||||
t = find_program('test-ftp-parser')
|
t = find_program('test-ftp-parser')
|
||||||
test('ftp-parser', t, depends:[exe], 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)
|
||||||
|
endif
|
||||||
|
@ -34,4 +34,6 @@ if conf_data.get('CONFIG_DATA')
|
|||||||
endif
|
endif
|
||||||
srcs += files('about.c', 'common.c', 'date.c', 'header.c', 'protocol.cpp', 'proxy.c', 'uri.c', 'user.c')
|
srcs += files('about.c', 'common.c', 'date.c', 'header.c', 'protocol.cpp', 'proxy.c', 'uri.c', 'user.c')
|
||||||
|
|
||||||
subdir('test')
|
if get_option('test')
|
||||||
|
subdir('test')
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user