summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2013-12-20 15:51:06 +0000
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2013-12-20 15:53:08 +0000
commit36c56b55b9f932ce1c74b2582915771200b7246d (patch)
tree92212d24e6cb1968c70681d8a48498a1c3845b94
parentd9905252c2f6bdb2aa840b4a697bc05392af21a6 (diff)
Openembedded SDK tests modifications
The tests were modified to match the test cases described in wiki. So the output of hello world is also checked now. Test case with static linking was added. Change-Id: I3370c8368257f3d4c1f0dd5c27dd39700f06ab98 Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rwxr-xr-xopenembedded/scripts/sdkhelloc.sh17
-rwxr-xr-xopenembedded/scripts/sdkhelloc_static.sh47
-rwxr-xr-xopenembedded/scripts/sdkhellocxx.sh17
-rw-r--r--openembedded/sdkhelloc.yaml7
-rw-r--r--openembedded/sdkhelloc_static.yaml30
-rw-r--r--openembedded/sdkhellocxx.yaml7
6 files changed, 119 insertions, 6 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
diff --git a/openembedded/sdkhelloc.yaml b/openembedded/sdkhelloc.yaml
index c195694..3a96fe8 100644
--- a/openembedded/sdkhelloc.yaml
+++ b/openembedded/sdkhelloc.yaml
@@ -2,12 +2,17 @@ metadata:
name: sdkhelloc
format: "Lava-Test-Shell Test Definition 1.0"
description: "Test for C compiler in OpenEmbedded."
+ maintainer:
+ - milosz.wasilewski@linaro.org
os:
- openembedded
scope:
- functional
devices:
- - rtsm_ve-armv8
+ - rtsm_foundation-armv8
+ - rtsm_fvp_base-aemv8a
+ - rtsm_fvp_base_cortex-a57x4-a53x4
+ - rtsm_fvp_base_cortex-a57x1-a53x1
install:
git-repos:
diff --git a/openembedded/sdkhelloc_static.yaml b/openembedded/sdkhelloc_static.yaml
new file mode 100644
index 0000000..5a3ef9d
--- /dev/null
+++ b/openembedded/sdkhelloc_static.yaml
@@ -0,0 +1,30 @@
+metadata:
+ name: sdkhelloc-static
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Test for C compiler (static linking) in OpenEmbedded."
+ maintainer:
+ - milosz.wasilewski@linaro.org
+ os:
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - rtsm_foundation-armv8
+ - rtsm_fvp_base-aemv8a
+ - rtsm_fvp_base_cortex-a57x4-a53x4
+ - rtsm_fvp_base_cortex-a57x1-a53x1
+
+install:
+ git-repos:
+ - git://git.linaro.org/qa/test-definitions.git
+
+run:
+ steps:
+ - "cd test-definitions/openembedded/scripts"
+ - "./sdkhelloc_static.sh"
+
+parse:
+ pattern: "^(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)"
+ fixupdict:
+ PASS: pass
+ FAIL: fail
diff --git a/openembedded/sdkhellocxx.yaml b/openembedded/sdkhellocxx.yaml
index e86af7b..61c00ce 100644
--- a/openembedded/sdkhellocxx.yaml
+++ b/openembedded/sdkhellocxx.yaml
@@ -2,12 +2,17 @@ metadata:
name: sdkhellocxx
format: "Lava-Test-Shell Test Definition 1.0"
description: "Test for C++ compiler in OpenEmbedded."
+ maintainer:
+ - milosz.wasilewski@linaro.org
os:
- openembedded
scope:
- functional
devices:
- - rtsm_ve-armv8
+ - rtsm_foundation-armv8
+ - rtsm_fvp_base-aemv8a
+ - rtsm_fvp_base_cortex-a57x4-a53x4
+ - rtsm_fvp_base_cortex-a57x1-a53x1
install:
git-repos: