diff options
-rwxr-xr-x | bin/stock_ubuntu_platform_meta.sh | 47 | ||||
-rw-r--r-- | jobs/misc/misc-generic.txt | 7 | ||||
-rw-r--r-- | units/oem-generic-stock-ubuntu-meta.pxu | 6 | ||||
-rw-r--r-- | units/somerville-fv-regression.pxu | 3 | ||||
-rw-r--r-- | units/somerville-iev-full-20-04.pxu | 3 | ||||
-rw-r--r-- | units/somerville-iev-regression.pxu | 3 | ||||
-rw-r--r-- | units/stella-full-20-04.pxu | 3 | ||||
-rw-r--r-- | units/stella-regression.pxu | 4 | ||||
-rw-r--r-- | units/sutton-full-20-04.pxu | 3 | ||||
-rw-r--r-- | units/sutton-regression.pxu | 4 |
10 files changed, 81 insertions, 2 deletions
diff --git a/bin/stock_ubuntu_platform_meta.sh b/bin/stock_ubuntu_platform_meta.sh new file mode 100755 index 0000000..1d0a544 --- /dev/null +++ b/bin/stock_ubuntu_platform_meta.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +echo "Beginning Stock Ubuntu Platform Metapackage Test" 1>&2 + +failed() +{ + [ -n "$1" ] && echo "$1" + echo "$0 failed!!" + exit 1 +} + +passed() +{ + [ -n "$1" ] && echo "$1" + echo "$0 passed!!" + exit 0 +} + +codename=$(lsb_release -cs) + +case "$codename" in + ('focal') + for pkg in $(ubuntu-drivers list-oem | grep "^oem" | grep "meta$"); do + apt-get purge --yes "$pkg" >/dev/null 2>&1 # Completely remove the meta package first + done + meta=() + for pkg in $(ubuntu-drivers list-oem | grep "^oem" | grep "meta$"); do + meta+=("$pkg") + done + if [ "${#meta}" = 0 ]; then + failed "It can not find any platform meta package." + fi + apt-get update >/dev/null 2>&1 + ubuntu-drivers install + for pkg in "${meta[@]}"; do + if dpkg-query -W -f='${Status}\n' "$pkg" 2>&1 | grep "install ok installed" >/dev/null 2>&1; then + echo "$pkg is installed" + else + failed "$pkg is not installed" + fi + done + passed + ;; + (*) + echo "$codename is not supported yet." + ;; +esac diff --git a/jobs/misc/misc-generic.txt b/jobs/misc/misc-generic.txt index 0f3f53b..ddedf69 100644 --- a/jobs/misc/misc-generic.txt +++ b/jobs/misc/misc-generic.txt @@ -39,3 +39,10 @@ command: check_package.sh gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly lib _summary: Check if unwanted packages are installed _description: For some packages which may have license or patent issues, this case checks if they are installed. + +plugin: shell +id: misc/generic/stock_ubuntu_platform_meta +user: root +command: + stock_ubuntu_platform_meta.sh +_description: Check if the platform meta package can be installed from Ubuntu archives. diff --git a/units/oem-generic-stock-ubuntu-meta.pxu b/units/oem-generic-stock-ubuntu-meta.pxu new file mode 100644 index 0000000..939863d --- /dev/null +++ b/units/oem-generic-stock-ubuntu-meta.pxu @@ -0,0 +1,6 @@ +id: stock-ubuntu-meta-package +unit: test plan +_name: Stock Ubuntu Meta Package +_description: Stock Ubuntu Meta Package +include: + misc/generic/stock_ubuntu_platform_meta diff --git a/units/somerville-fv-regression.pxu b/units/somerville-fv-regression.pxu index c5e441a..556421a 100644 --- a/units/somerville-fv-regression.pxu +++ b/units/somerville-fv-regression.pxu @@ -18,6 +18,9 @@ nested_part: oobe oem-generic-blocker power-management-s + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package mandatory_include: exclude: somerville/suspend-power-button diff --git a/units/somerville-iev-full-20-04.pxu b/units/somerville-iev-full-20-04.pxu index 680aef4..dcf6f69 100644 --- a/units/somerville-iev-full-20-04.pxu +++ b/units/somerville-iev-full-20-04.pxu @@ -18,5 +18,8 @@ include: nested_part: oem-generic-full-20-04 power-management-s + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package mandatory_include: diff --git a/units/somerville-iev-regression.pxu b/units/somerville-iev-regression.pxu index 3ddb36b..b82755a 100644 --- a/units/somerville-iev-regression.pxu +++ b/units/somerville-iev-regression.pxu @@ -16,5 +16,8 @@ include: nested_part: oem-generic-blocker power-management-s + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package mandatory_include: diff --git a/units/stella-full-20-04.pxu b/units/stella-full-20-04.pxu index c3f5666..db518df 100644 --- a/units/stella-full-20-04.pxu +++ b/units/stella-full-20-04.pxu @@ -14,3 +14,6 @@ include: nested_part: oem-generic-full-20-04 power-management-stella + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package diff --git a/units/stella-regression.pxu b/units/stella-regression.pxu index c73141b..a6569b4 100644 --- a/units/stella-regression.pxu +++ b/units/stella-regression.pxu @@ -11,4 +11,6 @@ include: nested_part: oem-generic-blocker power-management-stella - + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package diff --git a/units/sutton-full-20-04.pxu b/units/sutton-full-20-04.pxu index 2deb2db..9344ced 100644 --- a/units/sutton-full-20-04.pxu +++ b/units/sutton-full-20-04.pxu @@ -15,5 +15,8 @@ include: com.canonical.ce::sutton/fingerprint-positive nested_part: oem-generic-full-20-04 + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package mandatory_include: exclude: diff --git a/units/sutton-regression.pxu b/units/sutton-regression.pxu index 456bca2..ffd2c7f 100644 --- a/units/sutton-regression.pxu +++ b/units/sutton-regression.pxu @@ -10,4 +10,6 @@ include: com.canonical.ce::sutton/sourceslist/subproject-bionic nested_part: oem-generic-blocker - + # The following part MUST run last + # The platform meta package is removed/re-installed from Ubuntu archives. + stock-ubuntu-meta-package |