Skip to content

Commit

Permalink
tests: split into separate binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jun 9, 2024
1 parent 87eaa75 commit 58e7abb
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 15 deletions.
6 changes: 0 additions & 6 deletions test/hyprland/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
Expand Down
10 changes: 1 addition & 9 deletions test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -36,4 +27,5 @@ test(
workdir: meson.project_source_root(),
)

subdir('utils')
subdir('hyprland')
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions test/utils/meson.build
Original file line number Diff line number Diff line change
@@ -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(),
)

0 comments on commit 58e7abb

Please sign in to comment.