Skip to content

Commit

Permalink
meson: fix test dependencies on rauc binary
Browse files Browse the repository at this point in the history
The tests lack a dependency on building the rauc binary.
As a result, the tests will fail when running them directly from a fresh
build directory:

  meson setup build
  meson test -C build

Fix this by defining the missing dependency for both the C-based and
pytest-based tests.

Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
  • Loading branch information
ejoerns committed Oct 16, 2024
1 parent 1570c91 commit 9a2e3f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ librauc = static_library('rauc',
dependencies : rauc_deps + [versiondep],
)

executable('rauc',
rauc_binary = executable('rauc',
'src/main.c',
dbus_sources,
include_directories : incdir,
Expand Down
2 changes: 2 additions & 0 deletions test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ foreach test_name : tests
test(
test_name,
exe,
depends : rauc_binary,
is_parallel : false,
timeout : 240,
protocol: 'tap',
Expand Down Expand Up @@ -92,6 +93,7 @@ if pytest.found()
pytest,
args: ['--basetemp', '/tmp/pytest-custom-root', '-vv', test_name + '.py'],
env: ['MESON_BUILD_DIR=' + rauc_build_root],
depends : rauc_binary,
is_parallel : false,
timeout : 120,
workdir : meson.current_source_dir(),
Expand Down

0 comments on commit 9a2e3f8

Please sign in to comment.