]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: add proper CI test for systemd-report
authorLennart Poettering <lennart@amutable.com>
Wed, 18 Feb 2026 14:16:14 +0000 (15:16 +0100)
committerLennart Poettering <lennart@amutable.com>
Fri, 20 Feb 2026 07:25:12 +0000 (08:25 +0100)
test/units/TEST-74-AUX-UTILS.report.sh [new file with mode: 0755]
test/units/TEST-74-AUX-UTILS.varlinkctl.sh

diff --git a/test/units/TEST-74-AUX-UTILS.report.sh b/test/units/TEST-74-AUX-UTILS.report.sh
new file mode 100755 (executable)
index 0000000..3e1f2af
--- /dev/null
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -eux
+set -o pipefail
+
+# Unset $PAGER so we don't have to use --no-pager everywhere
+export PAGER=
+
+systemd-report --help
+systemd-report help
+systemd-report --version
+systemd-report --json=help
+
+systemd-report metrics
+systemd-report metrics -j
+systemd-report metrics --no-legend
+systemd-report describe-metrics
+systemd-report describe-metrics -j
+systemd-report describe-metrics --no-legend
+systemd-report list-sources
+systemd-report list-sources -j
+systemd-report list-sources --no-legend
+
+systemd-report metrics io
+systemd-report metrics io.systemd piff
+systemd-report metrics piff
+systemd-report describe-metrics io
+systemd-report describe-metrics io.systemd piff
+systemd-report describe-metrics piff
+
+# test io.systemd.Network Metrics
+varlinkctl info /run/systemd/report/io.systemd.Network
+varlinkctl list-methods /run/systemd/report/io.systemd.Network
+varlinkctl --more call /run/systemd/report/io.systemd.Network io.systemd.Metrics.List {}
+varlinkctl --more call /run/systemd/report/io.systemd.Network io.systemd.Metrics.Describe {}
index d72acc59497da55dee9e67d17cabb38f349422d9..430809224016a24d157592e9fd350230330ecef8 100755 (executable)
@@ -242,12 +242,3 @@ systemd-run --wait --pipe --user --machine testuser@ \
 # test io.systemd.Unit in user manager
 systemd-run --wait --pipe --user --machine testuser@ \
         varlinkctl --more call "/run/user/$testuser_uid/systemd/io.systemd.Manager" io.systemd.Unit.List '{}'
-
-# test report
-systemd-report metrics
-
-# test io.systemd.Network Metrics
-varlinkctl info /run/systemd/report/io.systemd.Network
-varlinkctl list-methods /run/systemd/report/io.systemd.Network
-varlinkctl --more call /run/systemd/report/io.systemd.Network io.systemd.Metrics.List {}
-varlinkctl --more call /run/systemd/report/io.systemd.Network io.systemd.Metrics.Describe {}