From e16796826a3d8a483913bf2bc91445e41792d50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 9 Apr 2025 04:40:21 +0000 Subject: [PATCH] ci: cram: add test for tr181-button manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add initial test for tr181-button manager, checking that both Reset and WPS buttons are in Released state. This QA a proper device tree gpio button definitions, kernel modules etc. This is known to be working on Freedom, OSPv2 and Haze boards. Tests: PCF-1673 Signed-off-by: Petr Štetiar --- .../120-buttons.t | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .gitlab/tests/cram/generic/acceleration-plan-components/120-buttons.t diff --git a/.gitlab/tests/cram/generic/acceleration-plan-components/120-buttons.t b/.gitlab/tests/cram/generic/acceleration-plan-components/120-buttons.t new file mode 100644 index 0000000000..dee2cf9c17 --- /dev/null +++ b/.gitlab/tests/cram/generic/acceleration-plan-components/120-buttons.t @@ -0,0 +1,20 @@ +Create R alias: + + $ alias R="${CRAM_REMOTE_COMMAND:-}" + +Don't run test on Turris Omnia and OSPv1 boards as they don't have Reset and WPS buttons: + + $ [ "$DUT_BOARD" = "turris-omnia" ] || exit 80 + $ [ "$DUT_BOARD" = "urx851-hdk-3" ] || exit 80 + +Check that all buttons are in the expected state: + + $ R "ba-cli --less --json 'Device.Buttons.Button.*.Status?'" | jq --sort-keys '.[0]' + { + "Device.Buttons.Button.1.": { + "Status": "Released" + }, + "Device.Buttons.Button.2.": { + "Status": "Released" + } + }