projects
/
hvlinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c52b16
)
Add tests for C++ compiler
author
Hugo Villeneuve
<hugo@hugovil.com>
Thu, 12 Mar 2015 02:03:57 +0000
(22:03 -0400)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Thu, 12 Mar 2015 02:16:22 +0000
(22:16 -0400)
stage2/toolchain-test
patch
|
blob
|
history
diff --git
a/stage2/toolchain-test
b/stage2/toolchain-test
index
cf8fa58
..
58eae08
100755
(executable)
--- 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 $?