Move panel/common tests into new tests subdirectory

This commit is contained in:
Benjamin Berg 2018-04-06 13:46:47 +02:00
parent c2f601a9d4
commit d2d4980ce8
7 changed files with 26 additions and 22 deletions

View file

@ -255,6 +255,8 @@ subdir('panels')
subdir('shell')
subdir('search-provider')
subdir('tests')
if get_option('documentation')
subdir('man')
endif

View file

@ -139,25 +139,3 @@ run_target(
command: script
)
test_unit = 'test-hostname'
sources = files(
'hostname-helper.c',
test_unit + '.c'
)
cflags = [
'-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
'-DTEST_TOPSRCDIR="@0@"'.format(meson.source_root())
]
exe = executable(
test_unit,
sources,
include_directories: top_inc,
dependencies: [ common_deps, libwidgets_dep ],
c_args: cflags
)
test(test_unit, exe)

23
tests/common/meson.build Normal file
View file

@ -0,0 +1,23 @@
test_unit = 'test-hostname'
sources = files(
test_unit + '.c'
)
cflags = [
'-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
'-DTEST_TOPSRCDIR="@0@"'.format(meson.source_root())
]
exe = executable(
test_unit,
sources,
include_directories: [ top_inc, common_inc ],
dependencies: common_deps + [libwidgets_dep],
c_args: cflags,
)
test(test_unit, exe)

1
tests/meson.build Normal file
View file

@ -0,0 +1 @@
subdir('common')