diff --git a/tests/p_lzo/0-install_lzo.sh b/tests/p_lzo/0-install_lzo.sh index d91ca7b..93af2d7 100755 --- a/tests/p_lzo/0-install_lzo.sh +++ b/tests/p_lzo/0-install_lzo.sh @@ -1,5 +1,13 @@ #!/bin/bash # Author: Vivek Dubey # Akshay Karle +# Christoph Galuschka -t_InstallPackage lzop +t_Log "Running $0 - installing lzop" + +if [ $centos_ver = 5 ] + then + t_Log "This is a C5 system. Skipping." +else + t_InstallPackage lzop +fi diff --git a/tests/p_lzo/lzo_test.sh b/tests/p_lzo/lzo_test.sh index 16efd77..e90c17b 100755 --- a/tests/p_lzo/lzo_test.sh +++ b/tests/p_lzo/lzo_test.sh @@ -5,19 +5,29 @@ t_Log "Running $0 - testing lzo compression and decompression" -FILE1=/tmp/testfile.txt -FILE2=/tmp/testfile.lzo +if [ $centos_ver = 5 ] + then + t_Log "This is a C5 system. Skipping." + ret_val=0 +else + FILE1=/tmp/testfile.txt + FILE2=/tmp/testfile.lzo -echo 'CentOS' > ${FILE1} + echo 'CentOS' > ${FILE1} -# running compression -lzop -9 ${FILE1} -o ${FILE2} -/bin/rm ${FILE1} + # running compression + lzop -9 ${FILE1} -o ${FILE2} + /bin/rm ${FILE1} -lzop -d ${FILE2} -o ${FILE1} -/bin/rm ${FILE2} + lzop -d ${FILE2} -o ${FILE1} + /bin/rm ${FILE2} -#checking file content -grep -q 'CentOS' ${FILE1} + #checking file content + grep -q 'CentOS' ${FILE1} + ret_val=$? -t_CheckExitStatus $? + #clean up + /bin/rm ${FILE1} +fi + +t_CheckExitStatus $ret_val