tests: split into separate binaries

This commit is contained in:
Austin Horstman 2024-06-08 22:30:01 -05:00
parent 87eaa75b8a
commit 58e7abba2c
No known key found for this signature in database
8 changed files with 37 additions and 15 deletions

View File

@ -10,12 +10,6 @@ test_dep = [
test_src = files(
'../main.cpp',
'../JsonParser.cpp',
'../SafeSignal.cpp',
'../config.cpp',
'../css_reload_helper.cpp',
'../../src/config.cpp',
'../../src/util/css_reload_helper.cpp',
'backend.cpp',
'../../src/modules/hyprland/backend.cpp'
)

View File

@ -10,19 +10,10 @@ test_dep = [
test_src = files(
'main.cpp',
'JsonParser.cpp',
'SafeSignal.cpp',
'config.cpp',
'css_reload_helper.cpp',
'../src/config.cpp',
'../src/util/css_reload_helper.cpp',
)
if tz_dep.found()
test_dep += tz_dep
test_src += files('date.cpp')
endif
waybar_test = executable(
'waybar_test',
test_src,
@ -36,4 +27,5 @@ test(
workdir: meson.project_source_root(),
)
subdir('utils')
subdir('hyprland')

36
test/utils/meson.build Normal file
View File

@ -0,0 +1,36 @@
test_inc = include_directories('../../include')
test_dep = [
catch2,
fmt,
gtkmm,
jsoncpp,
spdlog,
]
test_src = files(
'../main.cpp',
'../config.cpp',
'../../src/config.cpp',
'JsonParser.cpp',
'SafeSignal.cpp',
'css_reload_helper.cpp',
'../../src/util/css_reload_helper.cpp',
)
if tz_dep.found()
test_dep += tz_dep
test_src += files('date.cpp')
endif
utils_test = executable(
'utils_test',
test_src,
dependencies: test_dep,
include_directories: test_inc,
)
test(
'utils',
utils_test,
workdir: meson.project_source_root(),
)