summaryrefslogtreecommitdiff
path: root/lava-test-shell
diff options
context:
space:
mode:
authorSenthil Kumaran S <senthil.kumaran@linaro.org>2016-11-10 13:37:18 +0530
committerSenthil Kumaran S <senthil.kumaran@linaro.org>2016-11-10 13:37:18 +0530
commit7aeb3b1452aefc214326d1b4fce834b72b9b3bbb (patch)
treed9f626cedee7765463936cb072e81bb2244710b4 /lava-test-shell
parent930a0e9c0b6cf8ea7892b47538cce933f26ba3e7 (diff)
Add simple pass, fail, error test definition for fedora.
Diffstat (limited to 'lava-test-shell')
-rw-r--r--lava-test-shell/fedora/echo-pass-fail-error-test.yaml23
-rwxr-xr-xlava-test-shell/fedora/scripts/echo-pass-fail-error.sh38
2 files changed, 61 insertions, 0 deletions
diff --git a/lava-test-shell/fedora/echo-pass-fail-error-test.yaml b/lava-test-shell/fedora/echo-pass-fail-error-test.yaml
new file mode 100644
index 0000000..4fab0fb
--- /dev/null
+++ b/lava-test-shell/fedora/echo-pass-fail-error-test.yaml
@@ -0,0 +1,23 @@
+metadata:
+ name: fail-pass-error
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Pass / Fail / Error test."
+ maintainer:
+ - senthil.kumaran@linaro.org
+ os:
+ - fedora
+ devices:
+ - lxc
+ scope:
+ - functional
+
+run:
+ steps:
+ - ./lava-test-shell/fedora/scripts/echo-pass-fail-error.sh
+
+parse:
+ pattern: "(?P<test_case_id>.*)\\s+(?P<result>PASS|FAIL|ERROR)\\s+"
+ fixupdict:
+ ERROR: fail
+ FAIL: fail
+ PASS: pass
diff --git a/lava-test-shell/fedora/scripts/echo-pass-fail-error.sh b/lava-test-shell/fedora/scripts/echo-pass-fail-error.sh
new file mode 100755
index 0000000..a8b3cd3
--- /dev/null
+++ b/lava-test-shell/fedora/scripts/echo-pass-fail-error.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Simple echo test script.
+#
+# Author: Senthil Kumaran S <senthil.kumaran@linaro.org>
+#
+# Copyright (C) 2016, 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.
+
+for i in {1..10}
+do
+ echo "test-case-$i ERROR "
+done
+
+for i in {11..20}
+do
+ echo "test-case-$i FAIL "
+done
+
+for i in {21..30}
+do
+ echo "test-case-$i PASS "
+done
+
+exit 0