From 909ab105a9b443e35ed3ab645dd20434e010519b Mon Sep 17 00:00:00 2001 From: Jonathan Cave Date: Tue, 30 Mar 2021 14:25:25 +0100 Subject: Add: check that ubuntu-drivers can be run Check this command is runnable and if a package list is produced use an attachment job to include it. --- units/miscellanea/jobs.pxu | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/units/miscellanea/jobs.pxu b/units/miscellanea/jobs.pxu index 4772507..eb72d08 100644 --- a/units/miscellanea/jobs.pxu +++ b/units/miscellanea/jobs.pxu @@ -495,3 +495,22 @@ _description: privileges _summary: Verify BMC user called 'maas' was successfully created + +id: miscellanea/ubuntu_drivers_list_oem_check +category_id: com.canonical.plainbox::miscellanea +_summary: Test the command to list-oem packages runs successfully +flags: simple +requires: executable.name == 'ubuntu-drivers' +command: + ubuntu-drivers list-oem --package-list="$PLAINBOX_SESSION_SHARE/ubuntu_drivers_list_oem_check" + +id: miscellanea/ubuntu_drivers_list_oem_check_attachment +category_id: com.canonical.plainbox::miscellanea +_summary: Attach the ubuntu-drivers output file if it exists +plugin: attachment +depends: miscellanea/ubuntu_drivers_list_oem_check +command: + if test -f "$PLAINBOX_SESSION_SHARE/ubuntu_drivers_list_oem_check"; then + cat "$PLAINBOX_SESSION_SHARE/ubuntu_drivers_list_oem_check" + fi + true -- cgit v1.2.3