From 7aeb3b1452aefc214326d1b4fce834b72b9b3bbb Mon Sep 17 00:00:00 2001 From: Senthil Kumaran S Date: Thu, 10 Nov 2016 13:37:18 +0530 Subject: Add simple pass, fail, error test definition for fedora. --- .../fedora/echo-pass-fail-error-test.yaml | 23 +++++++++++++ .../fedora/scripts/echo-pass-fail-error.sh | 38 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 lava-test-shell/fedora/echo-pass-fail-error-test.yaml create mode 100755 lava-test-shell/fedora/scripts/echo-pass-fail-error.sh (limited to 'lava-test-shell') 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.*)\\s+(?PPASS|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 +# +# 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 -- cgit v1.2.3