From 843e1beb3af0618bdfeeabef350c10a540184ca2 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jul 25 2019 15:30:35 +0000 Subject: Merge pull request #40 from psgreco/c8fixes First batch of fixes for CentOS8 --- diff --git a/tests/0_common/20_upgrade_all.sh b/tests/0_common/20_upgrade_all.sh index 68dc04d..89d10c1 100755 --- a/tests/0_common/20_upgrade_all.sh +++ b/tests/0_common/20_upgrade_all.sh @@ -7,7 +7,9 @@ if [ "$CENTOSPLUS" == "1" ] && [ "$centos_ver" == "7" ] && [ "$arch" == "x86_64" sed -i 's,DEFAULTKERNEL=.*,DEFAULTKERNEL=kernel-plus,g' /etc/sysconfig/kernel fi -yum -d0 -y install deltarpm +if [ "$centos_ver" -lt 8 ];then + yum -d0 -y install deltarpm +fi yum -d0 -y upgrade t_Log "Running $0 - listing all used/available packages" diff --git a/tests/p_chkconfig/chkconfig_list_services.sh b/tests/p_chkconfig/chkconfig_list_services.sh index 7d4716e..f7cdd28 100755 --- a/tests/p_chkconfig/chkconfig_list_services.sh +++ b/tests/p_chkconfig/chkconfig_list_services.sh @@ -4,6 +4,11 @@ t_Log "Running $0 - check if chkconfig can list a service status" +if [ $centos_ver -ge 8 ]; then + echo "CentOS $centos_ver does not use chkconfig, skipping" + exit 0 +fi + # network is used as example because it's standard with minimal install chkconfig --list network | grep -q '3:on' diff --git a/tests/p_cron/0-install_cron.sh b/tests/p_cron/0-install_cron.sh index 2b4d727..6fc6179 100755 --- a/tests/p_cron/0-install_cron.sh +++ b/tests/p_cron/0-install_cron.sh @@ -2,7 +2,7 @@ # Author: Athmane Madjoudj t_Log "$0 - Installing crond" -if (t_GetPkgRel basesystem | grep -q -E 'el6|el7') +if (t_GetPkgRel basesystem | grep -q -E 'el6|el7|el8') then pn="cronie" else diff --git a/tests/p_diffutils/20-diff-tests b/tests/p_diffutils/20-diff-tests index aba4f8e..72dce1e 100755 --- a/tests/p_diffutils/20-diff-tests +++ b/tests/p_diffutils/20-diff-tests @@ -340,7 +340,7 @@ mv "$DIRTEST"/a/lao "$DIRTEST"/a/LAO echo "Checking --ignore-file-name-case" echo "see https://bugzilla.redhat.com/show_bug.cgi?id=719001" echo "If this fails then the bug has been fixed" -if [ "$centos_ver" = "7" ];then +if [ "$centos_ver" -ge 7 ];then echo SKIP else diff --ignore-file-name-case "$DIRTEST"/a "$DIRTEST"/b | cmp "$FILES"/dir_case diff --git a/tests/p_gcc-gnat/0-install_gcc-gnat.sh b/tests/p_gcc-gnat/0-install_gcc-gnat.sh index c60a088..fa1919e 100755 --- a/tests/p_gcc-gnat/0-install_gcc-gnat.sh +++ b/tests/p_gcc-gnat/0-install_gcc-gnat.sh @@ -1,13 +1,13 @@ -#!/bin/bash +#!/bin/bash -x # Author: Pablo Greco # Install gcc-gnat t_Log "Running $0 - installing gcc-gnat." -# Install git -if [ $centos_ver -ge 7 ]; then +# Install gcc-gnat +if [ $centos_ver -eq 7 ]; then t_InstallPackage gcc-gnat else - t_Log "This test is skipped before CentOS7." + t_Log "This test is only valid in CentOS7." fi diff --git a/tests/p_gcc-gnat/test_gcc-gnat.sh b/tests/p_gcc-gnat/test_gcc-gnat.sh index f097c5f..3870a36 100755 --- a/tests/p_gcc-gnat/test_gcc-gnat.sh +++ b/tests/p_gcc-gnat/test_gcc-gnat.sh @@ -3,7 +3,7 @@ t_Log "Running $0 - gcc-gnat can build a hello.adb" -if [ "$centos_ver" -lt 7 ] ; then +if [ "$centos_ver" -ne 7 ] ; then t_Log "CentOS $centos_ver -> SKIP" exit 0 fi diff --git a/tests/p_java-1.6.0-openjdk/0-install-openjdk.sh b/tests/p_java-1.6.0-openjdk/0-install-openjdk.sh index 6304a31..38dfb35 100755 --- a/tests/p_java-1.6.0-openjdk/0-install-openjdk.sh +++ b/tests/p_java-1.6.0-openjdk/0-install-openjdk.sh @@ -2,6 +2,10 @@ # Author: Christoph Galuschka # Install java +if [ $centos_ver -ge 8 ]; then + echo "Package not included in CentOS $centos_ver, skipping" + exit 0 +fi if (t_GetArch | grep -qE 'aarch64|ppc64le') then echo "Package not included for current arch, skipping" diff --git a/tests/p_java-1.6.0-openjdk/10-test_java.sh b/tests/p_java-1.6.0-openjdk/10-test_java.sh index a1c6e6f..93d6264 100755 --- a/tests/p_java-1.6.0-openjdk/10-test_java.sh +++ b/tests/p_java-1.6.0-openjdk/10-test_java.sh @@ -1,6 +1,10 @@ #!/bin/sh # Author: Christoph Galuschka +if [ $centos_ver -ge 8 ]; then + echo "Package not included in CentOS $centos_ver, skipping" + exit 0 +fi if (t_GetArch | grep -qE 'aarch64|ppc64le') then echo "Package not included for current arch, skipping" diff --git a/tests/p_java-openjdk/p_java-openjdk-common b/tests/p_java-openjdk/p_java-openjdk-common index e7ff43e..f101e3f 100644 --- a/tests/p_java-openjdk/p_java-openjdk-common +++ b/tests/p_java-openjdk/p_java-openjdk-common @@ -4,11 +4,15 @@ [ ${centos_ver} -lt 7 ] && { t_Log "Multiple java versions test is only available since el7, skipping tests..." ; exit ; } +if [ ${centos_ver} -eq 8 ];then +JAVA_VERSIONS="1.8.0 11" +else JAVA_VERSIONS="1.7.0 1.8.0 11" if (t_GetArch | grep -qvE 'aarch64|ppc64le') then JAVA_VERSIONS="1.6.0 $JAVA_VERSIONS" fi +fi [ -z "${JAVA_VERSIONS}" ] && { t_Log "No java versions to test, skipping tests..." ; exit ; } diff --git a/tests/p_network/networking_enabled_test.sh b/tests/p_network/networking_enabled_test.sh index 9131395..7524fd4 100755 --- a/tests/p_network/networking_enabled_test.sh +++ b/tests/p_network/networking_enabled_test.sh @@ -3,7 +3,7 @@ t_Log "Running $0 - Check if networking is enabled." -if [ "$centos_ver" = "7" ] ; then +if [ "$centos_ver" -ge 7 ] ; then t_Log "CentOS $centos_ver -> SKIP" exit 0 else diff --git a/tests/p_screen/0-install_screen.sh b/tests/p_screen/0-install_screen.sh index e4efb4a..cf9064e 100755 --- a/tests/p_screen/0-install_screen.sh +++ b/tests/p_screen/0-install_screen.sh @@ -2,4 +2,8 @@ # GNU Screen t_Log "Running $0 - installing screen" +if [ "$centos_ver" -eq 8 ] ; then + t_Log "CentOS $centos_ver -> SKIP" + exit 0 +fi t_InstallPackage screen