tests: Depend on daemon for integration test
The carefree developer might try running meson test before meson compile, leaving them with a failing integration test: Start of lfb-integration tests dbus-daemon[326641]: [session uid=1000 pid=326641 pidfd=8] Activating service name='org.sigxcpu.Feedback' requested by ':1.0' (uid=1000 pid=326640 comm="$(pwd)/_build/tests/te") + exec $(pwd)/_build/src/feedbackd $(pwd)/_build/run: 18: exec: $(pwd)/_build/src/feedbackd: not found Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ if get_option('daemon')
|
|||||||
dependencies: fbd_deps,
|
dependencies: fbd_deps,
|
||||||
)
|
)
|
||||||
|
|
||||||
executable(
|
fbd_exe = executable(
|
||||||
'feedbackd',
|
'feedbackd',
|
||||||
sources: ['fbd.c', generated_dbus_sources[1]],
|
sources: ['fbd.c', generated_dbus_sources[1]],
|
||||||
include_directories: fbd_inc,
|
include_directories: fbd_inc,
|
||||||
|
|||||||
+14
-8
@@ -29,15 +29,10 @@ if get_option('tests')
|
|||||||
|
|
||||||
test_lfb_deps = [libfeedback_dep, glib, gio_unix]
|
test_lfb_deps = [libfeedback_dep, glib, gio_unix]
|
||||||
|
|
||||||
lfb_tests = ['lfb-event']
|
|
||||||
|
|
||||||
if get_option('daemon')
|
if get_option('daemon')
|
||||||
# The integration test needs the daemon
|
# The integration test needs the daemon
|
||||||
lfb_tests += 'lfb-integration'
|
test = 'lfb-integration'
|
||||||
subdir('services')
|
subdir('services')
|
||||||
endif
|
|
||||||
|
|
||||||
foreach test : lfb_tests
|
|
||||||
t = executable(
|
t = executable(
|
||||||
'test-@0@'.format(test),
|
'test-@0@'.format(test),
|
||||||
['test-@0@.c'.format(test)],
|
['test-@0@.c'.format(test)],
|
||||||
@@ -46,8 +41,19 @@ if get_option('tests')
|
|||||||
link_args: test_lfb_link_args,
|
link_args: test_lfb_link_args,
|
||||||
dependencies: test_lfb_deps,
|
dependencies: test_lfb_deps,
|
||||||
)
|
)
|
||||||
test(test, t, env: test_env)
|
test(test, t, env: test_env, depends: fbd_exe)
|
||||||
endforeach
|
endif
|
||||||
|
|
||||||
|
test = 'lfb-event'
|
||||||
|
t = executable(
|
||||||
|
'test-@0@'.format(test),
|
||||||
|
['test-@0@.c'.format(test)],
|
||||||
|
c_args: test_lfb_cflags,
|
||||||
|
pie: true,
|
||||||
|
link_args: test_lfb_link_args,
|
||||||
|
dependencies: test_lfb_deps,
|
||||||
|
)
|
||||||
|
test(test, t, env: test_env)
|
||||||
|
|
||||||
# Daemon Unit tests
|
# Daemon Unit tests
|
||||||
if get_option('daemon')
|
if get_option('daemon')
|
||||||
|
|||||||
Reference in New Issue
Block a user