From 6007645124befc70ffe2fae5500022b215d59ce6 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 11 Mar 2015 22:03:57 -0400 Subject: [PATCH] Add tests for C++ compiler --- stage2/toolchain-test | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 $? -- 2.20.1