debian/tests: only run dkms test when dkms module is run
diff mbox series

Message ID 20191125155431.200825-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • debian/tests: only run dkms test when dkms module is run
Related show

Commit Message

Colin King Nov. 25, 2019, 3:54 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

In the case where the efi test driver is not built by dkms
then we should basically skip the dkms test.  To do this,
add a test control file that only runs the dkms-autopkgtest
if the dkms driver has been built.

This commit is requred by the earlier commit "efi_runtime: don't 
build dkms module for kernels 4.8.0 and above" to work on older
and current kernels.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 debian/tests/control | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 debian/tests/control

Comments

Alex Hung Nov. 25, 2019, 4:29 p.m. UTC | #1
On 2019-11-25 8:54 a.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> In the case where the efi test driver is not built by dkms
> then we should basically skip the dkms test.  To do this,
> add a test control file that only runs the dkms-autopkgtest
> if the dkms driver has been built.
> 
> This commit is requred by the earlier commit "efi_runtime: don't 
> build dkms module for kernels 4.8.0 and above" to work on older
> and current kernels.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  debian/tests/control | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 debian/tests/control
> 
> diff --git a/debian/tests/control b/debian/tests/control
> new file mode 100644
> index 00000000..f972527f
> --- /dev/null
> +++ b/debian/tests/control
> @@ -0,0 +1,3 @@
> +Test-Command: [ -e /lib/modules/$(uname -r)/updates/dkms/efi_runtime.ko ] && /usr/lib/dkms/dkms-autopkgtest || true
> +Restrictions: needs-root, allow-stderr
> +Depends: dkms
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Dec. 6, 2019, 2:31 a.m. UTC | #2
On 11/25/19 11:54 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> In the case where the efi test driver is not built by dkms
> then we should basically skip the dkms test.  To do this,
> add a test control file that only runs the dkms-autopkgtest
> if the dkms driver has been built.
> 
> This commit is requred by the earlier commit "efi_runtime: don't 
> build dkms module for kernels 4.8.0 and above" to work on older
> and current kernels.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  debian/tests/control | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 debian/tests/control
> 
> diff --git a/debian/tests/control b/debian/tests/control
> new file mode 100644
> index 00000000..f972527f
> --- /dev/null
> +++ b/debian/tests/control
> @@ -0,0 +1,3 @@
> +Test-Command: [ -e /lib/modules/$(uname -r)/updates/dkms/efi_runtime.ko ] && /usr/lib/dkms/dkms-autopkgtest || true
> +Restrictions: needs-root, allow-stderr
> +Depends: dkms
> 


Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 00000000..f972527f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@ 
+Test-Command: [ -e /lib/modules/$(uname -r)/updates/dkms/efi_runtime.ko ] && /usr/lib/dkms/dkms-autopkgtest || true
+Restrictions: needs-root, allow-stderr
+Depends: dkms