diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2014-02-21 14:10:26 +0000 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2014-02-21 14:10:26 +0000 |
commit | b56a539a92844a93ca9740640a5a0f6a813d70e7 (patch) | |
tree | dc2ef56475e63f26f1b5199993f21d6f4ba938b0 /openembedded/scripts | |
parent | 175889f3fa0ac88a8aaacad992695efa447d7084 (diff) | |
parent | 36c56b55b9f932ce1c74b2582915771200b7246d (diff) |
Merge "Openembedded SDK tests modifications"
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-x | openembedded/scripts/sdkhelloc.sh | 17 | ||||
-rwxr-xr-x | openembedded/scripts/sdkhelloc_static.sh | 47 | ||||
-rwxr-xr-x | openembedded/scripts/sdkhellocxx.sh | 17 |
3 files changed, 77 insertions, 4 deletions
diff --git a/openembedded/scripts/sdkhelloc.sh b/openembedded/scripts/sdkhelloc.sh index 163bd6b..f34628b 100755 --- a/openembedded/scripts/sdkhelloc.sh +++ b/openembedded/scripts/sdkhelloc.sh @@ -19,16 +19,29 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> +# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> # cd gcc hello.c -o hello > sdkhelloc.log +EXIT=0 if [ 0 -eq $? ] then echo "sdkhelloc: pass" - exit 0 else echo "sdkhelloc: fail" - exit 1 + EXIT=1 fi + +HELLO_OUT=$(./hello) + +if [ "$HELLO_OUT" != 'hello world' ] +then + echo "sdkhellocout: fail" + EXIT=1 +else + echo "sdkhellocout: pass" +fi + +exit $EXIT diff --git a/openembedded/scripts/sdkhelloc_static.sh b/openembedded/scripts/sdkhelloc_static.sh new file mode 100755 index 0000000..1d5935c --- /dev/null +++ b/openembedded/scripts/sdkhelloc_static.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# SDK hello.c static test. +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> +# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> +# + +cd +gcc -static hello.c -o hello > sdkhelloc.log +EXIT=0 + +if [ 0 -eq $? ] +then + echo "sdkhelloc_static: pass" +else + echo "sdkhelloc_static: fail" + EXIT=1 +fi + +HELLO_OUT=$(./hello) + +if [ "$HELLO_OUT" != 'hello world' ] +then + echo "sdkhellocout_static: fail" + EXIT=1 +else + echo "sdkhellocout_static: pass" +fi + +exit $EXIT diff --git a/openembedded/scripts/sdkhellocxx.sh b/openembedded/scripts/sdkhellocxx.sh index bc5e195..08b50fd 100755 --- a/openembedded/scripts/sdkhellocxx.sh +++ b/openembedded/scripts/sdkhellocxx.sh @@ -19,16 +19,29 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> +# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> # cd g++ hello.cc -o hello > sdkhellocxx.log +EXIT=0 if [ 0 -eq $? ] then echo "sdkhellocxx: pass" - exit 0 else echo "sdkhellocxx: fail" - exit 1 + EXIT=1 fi + +HELLO_OUT=$(./hello) + +if [ "$HELLO_OUT" != 'hello world' ] +then + echo "sdkhellocixxout: fail" + EXIT=1 +else + echo "sdkhellocxxout: pass" +fi + +exit $EXIT |