diff --git a/tests/p_bc/bc-test-basic-functionalities.sh b/tests/p_bc/bc-test-basic-functionalities.sh deleted file mode 100755 index 716b9a14..00000000 --- a/tests/p_bc/bc-test-basic-functionalities.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -# Author : Varadharajan M -# Manoj Mahalingam - -t_Log "Running $0 - Testing basic bc functionalities" -test `echo "5 + 6 * 5 / 10 - 1" | bc` -eq "7" ; t_CheckExitStatus $? diff --git a/tests/p_bc/bc-test-installation.sh b/tests/p_bc/bc-test-installation.sh deleted file mode 100755 index a58d7a19..00000000 --- a/tests/p_bc/bc-test-installation.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# Author : Varadharajan M -# Manoj Mahalingam - - -t_Log "Running $0 - Test bc is installed" -bc --version -t_CheckExitStatus $? diff --git a/tests/p_make/0-install_make.sh b/tests/p_make/0-install_make.sh new file mode 100755 index 00000000..ae0812fa --- /dev/null +++ b/tests/p_make/0-install_make.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Author: Lz + +if [ "$centos_ver" -ge "8" ];then + t_Log "Package not included in CentOS $centos_ver => SKIP" + exit 0 +fi + +t_Log "$0 - installing gcc make" +t_InstallPackage gcc make + diff --git a/tests/p_make/10-test_make.sh b/tests/p_make/10-test_make.sh new file mode 100755 index 00000000..6f3f8bf6 --- /dev/null +++ b/tests/p_make/10-test_make.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Author: Lz + +if [ "$centos_ver" -ge "8" ];then + t_Log "Package not included in CentOS $centos_ver => SKIP" + exit 0 +fi + +t_Log "Running $0 - Testing make by running it with a basic file" + +# creating source code +T_PATH='/var/tmp/make-test' +FILE="${T_PATH}/make-gcc.c" +EXE="${T_PATH}/make-gcc" +MAKEFILE="${T_PATH}/Makefile" + + +if [ ! -d "${T_PATH}" ];then + mkdir -p ${T_PATH} +fi + +cat > ${MAKEFILE} < ${FILE} < +int main() +{ + printf("HelloWorld\n"); + return 0; +} +EOF + + +# Executing make +cd ${T_PATH} +make +cd - + +# run EXE +$EXE | grep -q 'HelloWorld' +t_CheckExitStatus $? + +# remove files +/bin/rm ${T_PATH} -rf