From: Nicolas Zingilé Date: Wed, 13 Aug 2014 14:22:43 +0000 (+0200) Subject: clean up the test suite and adapt it to common-suite-launcher v2 X-Git-Tag: submit/tizen/20140813.142556^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed8f7f17dd431707048035becd4bf9b84522e469;p=test%2Fcommon%2Fcommon-sanity-suite.git clean up the test suite and adapt it to common-suite-launcher v2 Change-Id: Id0df4d3a8aee34d381586bdbd9bd102ddbe9ee33 Signed-off-by: Nicolas Zingilé --- diff --git a/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json b/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json new file mode 100644 index 0000000..7e927f5 --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json @@ -0,0 +1,170 @@ +[ + { + "name": "bluetoothd", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check bluetoothd daemon launching", + "description": "Check if the bluetoothd daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh bluetoothd", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2013-12-11 16:12:02 GMT", + "mtime": "2014-05-13 16:02:08 GMT" + }, + { + "name": "connmand", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check connmand daemon launching", + "description": "Check if the connmand daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh connmand", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2013-12-11 16:12:33 GMT", + "mtime": "2014-05-13 16:02:20 GMT" + }, + { + "name": "dbus-daemon", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check dbus-daemon launching", + "description": "Check if the dbus-daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh dbus-daemon", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2013-12-11 16:12:54 GMT", + "mtime": "2014-05-13 16:02:29 GMT" + }, + { + "name": "systemd-udevd", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check systemd-udevd daemon launching", + "description": "Check if the systemd-udevd daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh systemd-udevd", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2013-12-11 16:17:02 GMT", + "mtime": "2014-05-13 16:02:46 GMT" + }, + { + "name": "wpa_supplicant", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check wpa_supplicant daemon launching", + "description": "Check if the wpa_supplicant daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh wpa_supplicant", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2013-12-11 16:17:26 GMT", + "mtime": "2014-05-13 16:02:55 GMT" + }, + { + "name": "weston", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check weston-launch daemon launching", + "description": "Check if the weston daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh weston", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2013-12-12 15:53:34 GMT", + "mtime": "2014-05-13 16:03:03 GMT" + }, + { + "name": "ofonod", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "check ofonod daemon launching", + "description": "Check if ofonod daemon is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh ofonod", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2014-02-05 12:51:40 GMT", + "mtime": "2014-05-13 16:03:18 GMT" + } +] diff --git a/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json b/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json new file mode 100644 index 0000000..3c8a62f --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json @@ -0,0 +1,26 @@ +[ + { + "name": "weston-desktop-shell", + "exec_type": "auto", + "priority": "0", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "Check if weston desktop is shown", + "description": "Check if the weston-desktop-shell process is launched", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "checkprocess.sh weston-desktop-shell", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2014-05-13 16:10:30 GMT", + "mtime": "2014-05-13 16:21:00 GMT" + } +] \ No newline at end of file diff --git a/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json b/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json new file mode 100644 index 0000000..6c7a138 --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json @@ -0,0 +1,50 @@ +[ + { + "name": "audio-ogg", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "Check if an audio ogg file can be played", + "description": "Check if an audio ogg file can be played using gst-play", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh cigale.ogg", + "exec": "runme.sh gst.sh cigale.ogg", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh cigale.ogg", + "service": {}, + "author": "qadmin", + "ctime": "2014-05-13 16:32:34 GMT", + "mtime": "2014-05-22 08:31:42 GMT" + }, + { + "name": "video-ogg", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "Check if an video ogg file can be played", + "description": "Check if an video ogg file can be played using gst-play", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh short-big_buck_bunny_1080p.ogg", + "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.ogg", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh short-big_buck_bunny_1080p.ogg", + "service": {}, + "author": "qadmin", + "ctime": "2014-05-13 16:36:37 GMT", + "mtime": "2014-05-22 08:27:31 GMT" + } +] \ No newline at end of file diff --git a/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg b/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg new file mode 100644 index 0000000..31cf2a6 Binary files /dev/null and b/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg differ diff --git a/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh b/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh new file mode 100755 index 0000000..7554f6a --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh @@ -0,0 +1,28 @@ +#!/bin/bash -x + +# Copyright (c) 2013 Intel Corporation. All rights reserved. +# Use of this source code is governed by a LGPL v2.1 license that can be +# found in the LICENSE file in the db directory. +# Author : Ewan Le Bideau-Canevet + + +FILE=$1 +UNWANTED="No decoder available" +COMMAND="gst-play-1.0 /$HOME/$FILE" + +tmplog=$(mktemp --tmpdir=/tmp multimedia-XXXXXX.log) +trap "rm -f $tmplog" STOP INT QUIT EXIT +echo $COMMAND +$COMMAND &>$tmplog & +pid=$! +(sleep 5; [ -e /proc/$pid ] && kill $pid;) & +while [ -e /proc/$pid ]; do + sleep 1 + if grep "$UNWANTED" $tmplog ; then + kill $pid + sleep 1 + [ -e /proc/$pid ] && kill -9 $pid + exit 1 + fi +done +exit 0 diff --git a/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh b/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh new file mode 100755 index 0000000..24599bb --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# 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. +# +# Authors : Ewan le Bideau Canevet + +FILE=$1 +cp $FILE ~guest diff --git a/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh b/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh new file mode 100755 index 0000000..a0dd115 --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# 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. +# +# Authors : Ewan le Bideau Canevet + +FILE=$1 +rm -rf ~guest/$FILE diff --git a/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg b/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg new file mode 100644 index 0000000..6520f76 Binary files /dev/null and b/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg differ diff --git a/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json b/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json new file mode 100644 index 0000000..eb7033b --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json @@ -0,0 +1,74 @@ +[ + { + "name": "smack", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "Check if smack is correctly enabled", + "description": "Check if security has been correctly enabled on the image", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "mount |grep smackfs", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "qadmin", + "ctime": "2014-05-22 08:07:39 GMT", + "mtime": "2014-05-22 08:14:56 GMT" + }, + { + "name": "zypper-install", + "exec_type": "auto", + "priority": "0", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "Checkk that zypper can install a package", + "description": "Check that a package can be install with zypper ", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "zypper -n in zypper-log", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2014-05-13 16:36:37 GMT", + "mtime": "2014-05-13 17:09:34 GMT" + }, + { + "name": "zypper-uninstall", + "exec_type": "auto", + "priority": "0", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "Checkk that zypper can uninstall a package", + "description": "Check that a package can be uninstall with zypper", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "zypper -n rm zypper-log", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": {}, + "author": "zingile", + "ctime": "2014-05-13 17:10:00 GMT", + "mtime": "2014-05-13 17:11:26 GMT" + } +] \ No newline at end of file diff --git a/TESTDIR/00-common/A0-sanity/checkprocess.sh b/TESTDIR/00-common/A0-sanity/checkprocess.sh new file mode 100755 index 0000000..eb6e9c0 --- /dev/null +++ b/TESTDIR/00-common/A0-sanity/checkprocess.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# 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. +# +# Authors: Nicolas Zingilé + +PROCESS_NAME=$1 +CMD_RESULT=$(ps -fC $PROCESS_NAME |grep -v "PID"); + +echo "$CMD_RESULT" + +if [[ -n "$CMD_RESULT" ]] +then + exit 0; +else + exit 1; +fi diff --git a/TESTDIR/runme.sh b/TESTDIR/runme.sh new file mode 100755 index 0000000..59769d7 --- /dev/null +++ b/TESTDIR/runme.sh @@ -0,0 +1,16 @@ +#!/bin/bash -x +CMD="$@" +tmpscript=$(mktemp) +trap "rm -rf $tmpscript" INT QUIT TERM STOP EXIT +echo "#!/bin/bash " > $tmpscript +tr '\0' '\n' > $tmpscript +echo export PATH=$QAPATH:\$PATH >> $tmpscript +#echo env >> $tmpscript +echo $CMD >> $tmpscript +chmod 777 $tmpscript +su - guest -c $tmpscript +if [ $? -eq 0 ]; then + exit 0 +else + exit 1 +fi diff --git a/common/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json b/common/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json deleted file mode 100644 index 7e927f5..0000000 --- a/common/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json +++ /dev/null @@ -1,170 +0,0 @@ -[ - { - "name": "bluetoothd", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check bluetoothd daemon launching", - "description": "Check if the bluetoothd daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh bluetoothd", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2013-12-11 16:12:02 GMT", - "mtime": "2014-05-13 16:02:08 GMT" - }, - { - "name": "connmand", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check connmand daemon launching", - "description": "Check if the connmand daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh connmand", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2013-12-11 16:12:33 GMT", - "mtime": "2014-05-13 16:02:20 GMT" - }, - { - "name": "dbus-daemon", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check dbus-daemon launching", - "description": "Check if the dbus-daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh dbus-daemon", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2013-12-11 16:12:54 GMT", - "mtime": "2014-05-13 16:02:29 GMT" - }, - { - "name": "systemd-udevd", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check systemd-udevd daemon launching", - "description": "Check if the systemd-udevd daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh systemd-udevd", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2013-12-11 16:17:02 GMT", - "mtime": "2014-05-13 16:02:46 GMT" - }, - { - "name": "wpa_supplicant", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check wpa_supplicant daemon launching", - "description": "Check if the wpa_supplicant daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh wpa_supplicant", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2013-12-11 16:17:26 GMT", - "mtime": "2014-05-13 16:02:55 GMT" - }, - { - "name": "weston", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check weston-launch daemon launching", - "description": "Check if the weston daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh weston", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2013-12-12 15:53:34 GMT", - "mtime": "2014-05-13 16:03:03 GMT" - }, - { - "name": "ofonod", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "check ofonod daemon launching", - "description": "Check if ofonod daemon is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh ofonod", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2014-02-05 12:51:40 GMT", - "mtime": "2014-05-13 16:03:18 GMT" - } -] diff --git a/common/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json b/common/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json deleted file mode 100644 index 3c8a62f..0000000 --- a/common/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "name": "weston-desktop-shell", - "exec_type": "auto", - "priority": "0", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "Check if weston desktop is shown", - "description": "Check if the weston-desktop-shell process is launched", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "checkprocess.sh weston-desktop-shell", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2014-05-13 16:10:30 GMT", - "mtime": "2014-05-13 16:21:00 GMT" - } -] \ No newline at end of file diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json b/common/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json deleted file mode 100644 index 6c7a138..0000000 --- a/common/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "name": "audio-ogg", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "Check if an audio ogg file can be played", - "description": "Check if an audio ogg file can be played using gst-play", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh cigale.ogg", - "exec": "runme.sh gst.sh cigale.ogg", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh cigale.ogg", - "service": {}, - "author": "qadmin", - "ctime": "2014-05-13 16:32:34 GMT", - "mtime": "2014-05-22 08:31:42 GMT" - }, - { - "name": "video-ogg", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "Check if an video ogg file can be played", - "description": "Check if an video ogg file can be played using gst-play", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh short-big_buck_bunny_1080p.ogg", - "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.ogg", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh short-big_buck_bunny_1080p.ogg", - "service": {}, - "author": "qadmin", - "ctime": "2014-05-13 16:36:37 GMT", - "mtime": "2014-05-22 08:27:31 GMT" - } -] \ No newline at end of file diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg b/common/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg deleted file mode 100644 index 31cf2a6..0000000 Binary files a/common/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg and /dev/null differ diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh b/common/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh deleted file mode 100755 index 7554f6a..0000000 --- a/common/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -x - -# Copyright (c) 2013 Intel Corporation. All rights reserved. -# Use of this source code is governed by a LGPL v2.1 license that can be -# found in the LICENSE file in the db directory. -# Author : Ewan Le Bideau-Canevet - - -FILE=$1 -UNWANTED="No decoder available" -COMMAND="gst-play-1.0 /$HOME/$FILE" - -tmplog=$(mktemp --tmpdir=/tmp multimedia-XXXXXX.log) -trap "rm -f $tmplog" STOP INT QUIT EXIT -echo $COMMAND -$COMMAND &>$tmplog & -pid=$! -(sleep 5; [ -e /proc/$pid ] && kill $pid;) & -while [ -e /proc/$pid ]; do - sleep 1 - if grep "$UNWANTED" $tmplog ; then - kill $pid - sleep 1 - [ -e /proc/$pid ] && kill -9 $pid - exit 1 - fi -done -exit 0 diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh b/common/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh deleted file mode 100755 index 24599bb..0000000 --- a/common/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# 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. -# -# Authors : Ewan le Bideau Canevet - -FILE=$1 -cp $FILE ~guest diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh b/common/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh deleted file mode 100755 index a0dd115..0000000 --- a/common/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# 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. -# -# Authors : Ewan le Bideau Canevet - -FILE=$1 -rm -rf ~guest/$FILE diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg b/common/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg deleted file mode 100644 index 6520f76..0000000 Binary files a/common/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg and /dev/null differ diff --git a/common/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json b/common/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json deleted file mode 100644 index eb7033b..0000000 --- a/common/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json +++ /dev/null @@ -1,74 +0,0 @@ -[ - { - "name": "smack", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "Check if smack is correctly enabled", - "description": "Check if security has been correctly enabled on the image", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "mount |grep smackfs", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "qadmin", - "ctime": "2014-05-22 08:07:39 GMT", - "mtime": "2014-05-22 08:14:56 GMT" - }, - { - "name": "zypper-install", - "exec_type": "auto", - "priority": "0", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "Checkk that zypper can install a package", - "description": "Check that a package can be install with zypper ", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "zypper -n in zypper-log", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2014-05-13 16:36:37 GMT", - "mtime": "2014-05-13 17:09:34 GMT" - }, - { - "name": "zypper-uninstall", - "exec_type": "auto", - "priority": "0", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "Checkk that zypper can uninstall a package", - "description": "Check that a package can be uninstall with zypper", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "zypper -n rm zypper-log", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": {}, - "author": "zingile", - "ctime": "2014-05-13 17:10:00 GMT", - "mtime": "2014-05-13 17:11:26 GMT" - } -] \ No newline at end of file diff --git a/common/TESTDIR/00-common/A0-sanity/checkprocess.sh b/common/TESTDIR/00-common/A0-sanity/checkprocess.sh deleted file mode 100755 index eb6e9c0..0000000 --- a/common/TESTDIR/00-common/A0-sanity/checkprocess.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# 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. -# -# Authors: Nicolas Zingilé - -PROCESS_NAME=$1 -CMD_RESULT=$(ps -fC $PROCESS_NAME |grep -v "PID"); - -echo "$CMD_RESULT" - -if [[ -n "$CMD_RESULT" ]] -then - exit 0; -else - exit 1; -fi diff --git a/common/TESTDIR/runme.sh b/common/TESTDIR/runme.sh deleted file mode 100755 index 59769d7..0000000 --- a/common/TESTDIR/runme.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -x -CMD="$@" -tmpscript=$(mktemp) -trap "rm -rf $tmpscript" INT QUIT TERM STOP EXIT -echo "#!/bin/bash " > $tmpscript -tr '\0' '\n' > $tmpscript -echo export PATH=$QAPATH:\$PATH >> $tmpscript -#echo env >> $tmpscript -echo $CMD >> $tmpscript -chmod 777 $tmpscript -su - guest -c $tmpscript -if [ $? -eq 0 ]; then - exit 0 -else - exit 1 -fi diff --git a/common/runtest.sh b/common/runtest.sh deleted file mode 100644 index 3455b16..0000000 --- a/common/runtest.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# this script was generated by /home/zingile/git/qatizen/node_modules/libqa/executors/PACKAGE.js - -set -e -resdir=/tmp -resfile=$resdir/testkit.result.xml - -echo '## execution script: preparing environment' -rm -rf $resdir/*.result.xml - -timeout 10800 testkit-lite -f /usr/share/tests/common-sanity-suite/testkit.xml --comm localhost -o $resfile - -echo '## execution script: finished' \ No newline at end of file diff --git a/common/testkit.xml b/common/testkit.xml deleted file mode 100644 index f512181..0000000 --- a/common/testkit.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ivi/README b/ivi/README deleted file mode 100644 index a07da90..0000000 --- a/ivi/README +++ /dev/null @@ -1,20 +0,0 @@ ------------------------ -Introduction ------------------------ -This suite is to check system core processes,ensure the basic quality of overall system. - ------------------------ -How to Run ------------------------ -(Suppose you only get the source code and testkit-lite has been setup on your test machine - if you have got ivi-dist-bat-tests RPM, you can directly go to step.4 on testing machine - if you don't have testkit-lite, you can get it from https://github.com/testkit/testkit-lite) - -Steps: - -1. testkit-lite -f /usr/share/tests/ivi-dist-bat-tests/tests.xml --comm localhost -o ./results.xml - - ------------------------ -TODO ------------------------ diff --git a/ivi/prs_checker b/ivi/prs_checker deleted file mode 100755 index 6cc64c0..0000000 --- a/ivi/prs_checker +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# Copyright (C) 2010 Intel Corporation -# -# 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. -# -# Authors: -# Yu liyun -# Date Created: 2011/03/24 -# -# Modifications: -# Modificator Date -# Content of Modification -# - -echo "*** prs_checker ***" -echo "You supplied $# parameters [ $@ ]" - -if [ $# -lt 1 ]; then - echo "Usage: prs_checker process_name" - exit 2 -fi - -process=$1 -sleep 5 -pgrep "$1" -if [ $? -ne 0 ]; then - echo "Not find process $process." - exit 1 -fi - -exit 0 diff --git a/ivi/tests.xml b/ivi/tests.xml deleted file mode 100644 index 4364b3b..0000000 --- a/ivi/tests.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker bluetoothd - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker bluetoothd - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker ofonod - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker ofonod - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker dbus - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker dbus - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker ambd - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker ambd - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker murphyd - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker murphyd - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker connmand - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker connmand - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker weston - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker weston - - - IVI - - - - - - - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker wpa_supplicant - 0 - - - /usr/share/tests/ivi-dist-bat-tests/prs_checker wpa_supplicant - - - IVI - - - - diff --git a/packaging/common-sanity-suite.spec b/packaging/common-sanity-suite.spec index f6a196c..36630ad 100644 --- a/packaging/common-sanity-suite.spec +++ b/packaging/common-sanity-suite.spec @@ -1,7 +1,7 @@ Name: common-sanity-suite Summary: Sanity suite for Tizen Common -Version: 1.0.0 -Release: 1 +Version: 1.1 +Release: 0 License: GPL-2.0 Group: Development/Testing Source: %{name}-%{version}.tar.gz @@ -14,13 +14,6 @@ Requires: common-suite-launcher %description The common-sanity-suite is the acceptance test to validate the Tizen Common image -%package -n ivi-dist-bat-tests -Summary: Sanity suite for Tizen Common -Requires: testkit-lite - -%description -n ivi-dist-bat-tests -Basic acceptance tests for Tizen IVI profile - %prep %setup -q @@ -32,26 +25,14 @@ cp %{SOURCE1001} . %install ## common-sanity-suite -install -d %{buildroot}/%{_datadir}/tests/%{name} -install -m 0755 common/runtest.sh %{buildroot}/%{_datadir}/tests/%{name} -install -m 644 common/*.xml %{buildroot}/%{_datadir}/tests/%{name} -install -m 0644 LICENSE %{buildroot}/%{_datadir}/tests/%{name} -cp -r common/TESTDIR %{buildroot}/%{_datadir}/tests/%{name} - -## ivi-dist-bat-tests -mkdir -p %{buildroot}/%{_datadir}/tests/ivi-dist-bat-tests -install -m 0755 ivi/prs_checker %{buildroot}/%{_datadir}/tests/ivi-dist-bat-tests -install -m 0644 ivi/tests.xml %{buildroot}/%{_datadir}/tests/ivi-dist-bat-tests -install -m 0644 ivi/README %{buildroot}/%{_datadir}/tests/ivi-dist-bat-tests -install -m 0644 LICENSE %{buildroot}/%{_datadir}/tests/ivi-dist-bat-tests +install -d %{buildroot}/%{_datadir}/tests/%{profile}/%{name} +install -m 0755 runtest %{buildroot}/%{_datadir}/tests/%{profile}/%{name} +install -m 644 *.xml %{buildroot}/%{_datadir}/tests/%{profile}/%{name} +install -m 0644 LICENSE %{buildroot}/%{_datadir}/tests/%{profile}/%{name} +cp -r TESTDIR %{buildroot}/%{_datadir}/tests/%{profile}/%{name} %files %manifest %{name}.manifest %defattr(-,root,root) -%{_datadir}/tests/%{name} - -%files -n ivi-dist-bat-tests -%manifest %{name}.manifest -%defattr(-,root,root) -%{_datadir}/tests/ivi-dist-bat-tests +%{_datadir}/tests/%{profile}/%{name} diff --git a/runtest b/runtest new file mode 100644 index 0000000..cf96a39 --- /dev/null +++ b/runtest @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +resdir="" + +if [[ ! -z $1 ]]; then + resdir=$1 +else + exit 1 +fi + +resfile=$resdir/$(basename $(pwd)).result.xml + +timeout 10800 testkit-lite -f /usr/share/tests/common/common-sanity-suite/testkit.xml --comm localhost -o $resfile + +echo -e '\n## execution script: finished' diff --git a/testkit.xml b/testkit.xml new file mode 100644 index 0000000..a427b05 --- /dev/null +++ b/testkit.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +