summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-08-16 10:25:58 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-08-16 10:25:58 +0200
commit30ef9227159aab95c30eac1839ccccff28e90c6a (patch)
tree8695e2dbd0c3afa17ff1e2648b67fd0d1f041437
parentbf67cb56c0d09d70f88dda86f409d4a5449e11bf (diff)
compile hello world for native compile test
-rwxr-xr-xembedded-test.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/embedded-test.sh b/embedded-test.sh
index e7e6926..f038bf7 100755
--- a/embedded-test.sh
+++ b/embedded-test.sh
@@ -948,6 +948,19 @@ cat >> $file << EOF
/opt/ltp/runltp $tee
EOF
fi
+ # native test
+ if [ $test = "native" ]; then
+cat >> $file << EOF
+echo '#include <stdio.h>\nint main() {\n printf("Hello World");\n return 0; \n}'> /hello.c
+gcc -o /hello /hello.c $tee
+/hello $tee
+if [ \$? -eq 0 ]; then
+ echo "\nsuccess"
+else
+ echo "\nfailed"
+fi
+EOF
+ fi
# mksh test
if [ $test = "mksh" ]; then
cat >> $file << EOF