diff --git a/tests/p_lzo/0-install_lzo.sh b/tests/p_lzo/0-install_lzo.sh deleted file mode 100755 index 6d13b7f..0000000 --- a/tests/p_lzo/0-install_lzo.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Author: Vivek Dubey -# Akshay Karle -# Christoph Galuschka - -t_Log "Running $0 - installing lzo" - -if [ $centos_ver = 5 ] - then - t_Log "This is a C5 system. Skipping." -else - t_InstallPackage lzo -fi diff --git a/tests/p_lzo/lzo_test.sh b/tests/p_lzo/lzo_test.sh deleted file mode 100755 index e90c17b..0000000 --- a/tests/p_lzo/lzo_test.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# Author: Vivek Dubey -# Akshay Karle -# Christoph Galuschka - -t_Log "Running $0 - testing lzo compression and decompression" - -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} - - # running compression - lzop -9 ${FILE1} -o ${FILE2} - /bin/rm ${FILE1} - - lzop -d ${FILE2} -o ${FILE1} - /bin/rm ${FILE2} - - #checking file content - grep -q 'CentOS' ${FILE1} - ret_val=$? - - #clean up - /bin/rm ${FILE1} -fi - -t_CheckExitStatus $ret_val diff --git a/tests/p_lzop/0-install_lzop.sh b/tests/p_lzop/0-install_lzop.sh new file mode 100755 index 0000000..93af2d7 --- /dev/null +++ b/tests/p_lzop/0-install_lzop.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Author: Vivek Dubey +# Akshay Karle +# Christoph Galuschka + +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_lzop/lzop_test.sh b/tests/p_lzop/lzop_test.sh new file mode 100755 index 0000000..007366c --- /dev/null +++ b/tests/p_lzop/lzop_test.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# Author: Vivek Dubey +# Akshay Karle +# Christoph Galuschka + +t_Log "Running $0 - testing lzop compression and decompression" + +if [ $centos_ver = 5 ] + then + t_Log "This is a C5 system. Skipping." + ret_val=0 +elif [ $(t_GetArch) = i386 ] + then + t_Log "Package not available in i386 architecture. Skipping" + ret_val=0 +else + FILE1=/tmp/testfile.txt + FILE2=/tmp/testfile.lzo + + echo 'CentOS' > ${FILE1} + + # running compression + lzop -9 ${FILE1} -o ${FILE2} + /bin/rm ${FILE1} + + lzop -d ${FILE2} -o ${FILE1} + /bin/rm ${FILE2} + + #checking file content + grep -q 'CentOS' ${FILE1} + ret_val=$? + + #clean up + /bin/rm ${FILE1} +fi + +t_CheckExitStatus $ret_val