Skip to content

Commit

Permalink
conditionally remove tests from cross build (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
n80fr1n60 authored Mar 7, 2025
1 parent f437c24 commit a13c150
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/luks/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ else
endif

# Tests.
subdir('tests')

if not meson.is_cross_build()
subdir('tests')
endif
5 changes: 4 additions & 1 deletion src/pins/pkcs11/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ if pcscd.found() and pkcs11tool.found()
mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-pkcs11.1')
### TODO: Include man pages
# mans += join_paths(meson.current_source_dir(), 'clevis-decrypt-pkcs11.1')
subdir('tests')
if not meson.is_cross_build()
subdir('tests')
endif

threads_dep = dependency('threads', required: true)
executable('clevis-pkcs11-afunix-socket-unlock', ['clevis-pkcs11-afunix-socket-unlock.c'],
dependencies: threads_dep,
Expand Down
4 changes: 3 additions & 1 deletion src/pins/tang/meson.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
curl = find_program('curl', required: false)

if curl.found()
if curl.found() or meson.is_cross_build()
bins += join_paths(meson.current_source_dir(), 'clevis-decrypt-tang')
bins += join_paths(meson.current_source_dir(), 'clevis-encrypt-tang')
mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-tang.1')

if not meson.is_cross_build()
subdir('tests')
endif
else
warning('Will not install tang pin due to missing dependencies!')
endif

0 comments on commit a13c150

Please sign in to comment.