summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-11-16 09:49:30 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-12-01 18:01:00 +0100
commit50f2c32cd5477bb42bf9a26e4aefd7230c2574c7 (patch)
tree5c8bb223fd39df2d3520a7feb743e91971ebdf35 /meson.build
parentb570204a97bccfbfce8fc4ffa65306f8a06fe16e (diff)
downloadsystemd-50f2c32cd5477bb42bf9a26e4aefd7230c2574c7.tar.gz
tests: add a simple test that bootctl output is valid json
python's json.tool module is used because it does validation. jq is more forgiving. Also, json is in the stdlib, so it should be always available.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 37d46dfae2..2fb5102971 100644
--- a/meson.build
+++ b/meson.build
@@ -2583,7 +2583,7 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
boot_link_with = [libsystemd_static, libshared_static]
endif
- public_programs += executable(
+ exe = executable(
'bootctl',
'src/boot/bootctl.c',
include_directories : includes,
@@ -2592,6 +2592,14 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
versiondep],
install_rpath : rootpkglibdir,
install : true)
+ public_programs += exe
+
+ if want_tests != 'false'
+ test('test-bootctl-json',
+ test_bootctl_json_sh,
+ args : exe.full_path(),
+ depends : exe)
+ endif
public_programs += executable(
'systemd-bless-boot',