From: Hugo Villeneuve Date: Thu, 12 Mar 2015 02:03:57 +0000 (-0400) Subject: Add tests for C++ compiler X-Git-Url: http://gitweb.hugovil.com/?p=hvlinux.git;a=commitdiff_plain;h=6007645124befc70ffe2fae5500022b215d59ce6 Add tests for C++ compiler --- diff --git a/stage2/toolchain-test b/stage2/toolchain-test index cf8fa58..58eae08 100755 --- a/stage2/toolchain-test +++ b/stage2/toolchain-test @@ -2,7 +2,7 @@ source ../functions/main -# Testing toolchain +# Testing C compiler cd /tmp echo 'main(){}' > dummy.c gcc dummy.c -Wl,--verbose &> dummy.log @@ -15,4 +15,16 @@ fi rm dummy.{c,log} a.out +# Testing C++ compiler +cd /tmp +echo 'main(){}' > dummy.cpp +g++ dummy.cpp -Wl,--verbose &> dummy.log +/tmp/a.out +if [ $? -ne 0]; then + echo "Cannot run C++ program" + exit 1 +fi + +rm dummy.{cpp,log} a.out + exit $?