From 5eb8b1ae7c5f5d1ec8de2c17ede97b54a66f52e8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 9 Nov 2022 14:08:54 +0100 Subject: setup-disk: env SETUP_DISK_TESTFUNC for unit testing Use an env var SETUP_DISK_TESTFUNC to run individual functions for unit testing purposes. --- setup-disk.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'setup-disk.in') diff --git a/setup-disk.in b/setup-disk.in index 54e138b..d56a572 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -1448,6 +1448,12 @@ case $kver in *) KERNEL_FLAVOR=lts;; esac +# for unit testing of individual functions +if [ -n "$SETUP_DISK_TESTFUNC" ]; then + $SETUP_DISK_TESTFUNC "$@" + exit +fi + USE_CRYPT= DISK_MODE= USE_LVM= -- cgit v1.2.3