From ed8f7f17dd431707048035becd4bf9b84522e469 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20Zingil=C3=A9?= Date: Wed, 13 Aug 2014 16:22:43 +0200 Subject: [PATCH] clean up the test suite and adapt it to common-suite-launcher v2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Id0df4d3a8aee34d381586bdbd9bd102ddbe9ee33 Signed-off-by: Nicolas Zingilé --- .../00-common/A0-sanity/00-core/QAMETA.json | 0 .../00-common/A0-sanity/01-gui/QAMETA.json | 0 .../A0-sanity/02-multimedia/QAMETA.json | 0 .../A0-sanity/02-multimedia/cigale.ogg | Bin .../00-common/A0-sanity/02-multimedia/gst.sh | 0 .../00-common/A0-sanity/02-multimedia/init.sh | 0 .../00-common/A0-sanity/02-multimedia/post.sh | 0 .../short-big_buck_bunny_1080p.ogg | Bin .../00-common/A0-sanity/03-system/QAMETA.json | 0 .../00-common/A0-sanity/checkprocess.sh | 0 {common/TESTDIR => TESTDIR}/runme.sh | 0 common/runtest.sh | 13 -- ivi/README | 20 --- ivi/prs_checker | 43 ------ ivi/tests.xml | 133 ------------------ packaging/common-sanity-suite.spec | 35 ++--- runtest | 17 +++ common/testkit.xml => testkit.xml | 26 ++-- 18 files changed, 38 insertions(+), 249 deletions(-) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/00-core/QAMETA.json (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/01-gui/QAMETA.json (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/02-multimedia/QAMETA.json (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/02-multimedia/cigale.ogg (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/02-multimedia/gst.sh (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/02-multimedia/init.sh (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/02-multimedia/post.sh (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/03-system/QAMETA.json (100%) rename {common/TESTDIR => TESTDIR}/00-common/A0-sanity/checkprocess.sh (100%) rename {common/TESTDIR => TESTDIR}/runme.sh (100%) delete mode 100644 common/runtest.sh delete mode 100644 ivi/README delete mode 100755 ivi/prs_checker delete mode 100644 ivi/tests.xml create mode 100644 runtest rename common/testkit.xml => testkit.xml (60%) diff --git a/common/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json b/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/00-core/QAMETA.json rename to TESTDIR/00-common/A0-sanity/00-core/QAMETA.json diff --git a/common/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json b/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json rename to TESTDIR/00-common/A0-sanity/01-gui/QAMETA.json diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json b/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json rename to TESTDIR/00-common/A0-sanity/02-multimedia/QAMETA.json diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg b/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg rename to TESTDIR/00-common/A0-sanity/02-multimedia/cigale.ogg diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh b/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh rename to TESTDIR/00-common/A0-sanity/02-multimedia/gst.sh diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh b/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/02-multimedia/init.sh rename to TESTDIR/00-common/A0-sanity/02-multimedia/init.sh diff --git a/common/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh b/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/02-multimedia/post.sh rename to TESTDIR/00-common/A0-sanity/02-multimedia/post.sh diff --git a/common/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 similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg rename to TESTDIR/00-common/A0-sanity/02-multimedia/short-big_buck_bunny_1080p.ogg diff --git a/common/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json b/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/03-system/QAMETA.json rename to TESTDIR/00-common/A0-sanity/03-system/QAMETA.json diff --git a/common/TESTDIR/00-common/A0-sanity/checkprocess.sh b/TESTDIR/00-common/A0-sanity/checkprocess.sh similarity index 100% rename from common/TESTDIR/00-common/A0-sanity/checkprocess.sh rename to TESTDIR/00-common/A0-sanity/checkprocess.sh diff --git a/common/TESTDIR/runme.sh b/TESTDIR/runme.sh similarity index 100% rename from common/TESTDIR/runme.sh rename to TESTDIR/runme.sh 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/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/common/testkit.xml b/testkit.xml similarity index 60% rename from common/testkit.xml rename to testkit.xml index f512181..a427b05 100644 --- a/common/testkit.xml +++ b/testkit.xml @@ -9,7 +9,7 @@ - + @@ -19,7 +19,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -93,7 +93,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -135,7 +135,7 @@ - + -- 2.34.1