diff --git a/tests/c++-compiler/hello.c b/tests/c++-compiler/hello.c new file mode 100644 index 0000000..f4bd2c6 --- /dev/null +++ b/tests/c++-compiler/hello.c @@ -0,0 +1,6 @@ +#include + +int main() { + printf("Hello World!\n"); + return 0; +} diff --git a/tests/c++-compiler/test.sh b/tests/c++-compiler/test.sh index ba1b195..ccb1a2e 100755 --- a/tests/c++-compiler/test.sh +++ b/tests/c++-compiler/test.sh @@ -29,6 +29,12 @@ compiler_check_stdexcept() { $cmd } +compiler_check_helloworld() { + cmd="cc hello.c" + echo $cmd + $cmd +} + swap_env() { currentPrgEnv=$(module li 2>&1 | awk '/PrgEnv/{print $2}') if [ "$1" == gcc ] ; then @@ -51,6 +57,7 @@ for compiler in $compilers; do swap_env $compiler 2>$logfile >$logfile || error=1 module swap $compiler $compiler/$version 2>>$logfile >>$logfile || error=1 compiler_version_cmd $compiler 2>>$logfile >>$logfile || error=1 + compiler_check_helloworld $compiler 2>>$logfile >>$logfile || error=1 compiler_check_stdexcept $compiler 2>> $logfile >>$logfile || error=1 if [ $error != 0 ] ; then echo "failed :-("