From a14b76ef61b533397728a2e4b18288b40f5d39b5 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Tue, 2 Aug 2022 11:42:54 +0300 Subject: [PATCH] tests: Workaround for mkksiso options coming from newer lorax RPM --- test/cases/installers.sh | 7 ++++++- test/cases/ostree-ng.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/cases/installers.sh b/test/cases/installers.sh index 3006a86d2..9d8844edf 100755 --- a/test/cases/installers.sh +++ b/test/cases/installers.sh @@ -13,6 +13,7 @@ set -euo pipefail # Get OS data. source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Colorful output. function greenprint { @@ -64,7 +65,11 @@ echo -e 'admin\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers EOFKS echo "Writing new ISO" - sudo mkksiso -c "console=ttyS0,115200" "${newksfile}" "${iso}" "${newiso}" + if nvrGreaterOrEqual "lorax" "34.9.18"; then + sudo mkksiso -c "console=ttyS0,115200" --ks "${newksfile}" "${iso}" "${newiso}" + else + sudo mkksiso -c "console=ttyS0,115200" "${newksfile}" "${iso}" "${newiso}" + fi echo "==== NEW KICKSTART FILE ====" cat "${newksfile}" diff --git a/test/cases/ostree-ng.sh b/test/cases/ostree-ng.sh index b863f6d30..cdd8426fa 100755 --- a/test/cases/ostree-ng.sh +++ b/test/cases/ostree-ng.sh @@ -6,6 +6,7 @@ set -euo pipefail # Get OS data. source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Colorful output. function greenprint { @@ -194,7 +195,11 @@ ostree remote add --no-gpg-verify --no-sign-verify ${OSTREE_OSNAME} ${PROD_REPO_ EOFKS echo "Writing new ISO" - sudo mkksiso -c "console=ttyS0,115200" "${newksfile}" "${iso}" "${newiso}" + if nvrGreaterOrEqual "lorax" "34.9.18"; then + sudo mkksiso -c "console=ttyS0,115200" --ks "${newksfile}" "${iso}" "${newiso}" + else + sudo mkksiso -c "console=ttyS0,115200" "${newksfile}" "${iso}" "${newiso}" + fi echo "==== NEW KICKSTART FILE ====" cat "${newksfile}"