[ooo-build-commit] bin/test-ooo scratch/qa
Petr Mladek
pmladek at kemper.freedesktop.org
Thu Jun 11 02:55:35 PDT 2009
bin/test-ooo | 72 +++++++++++++++++++++++++++++--------------
scratch/qa/ooo-test-wrappers | 8 ++++
2 files changed, 57 insertions(+), 23 deletions(-)
New commits:
commit 21e043b0abb0d229ba476c1cda70a4910248a226
Author: Petr Mladek <pmladek at suse.cz>
Date: Thu Jun 11 11:26:41 2009 +0200
Last versions of our qa scripts (by Ke Yu)
* bin/test-ooo: many crazy bugs for Windows; uses closeoffice.bas
and resetoffice.bas
* scratch/qa/ooo-test-wrappers: simply script to try all installed
wrappers
diff --git a/bin/test-ooo b/bin/test-ooo
index aa77681..5e10452 100755
--- a/bin/test-ooo
+++ b/bin/test-ooo
@@ -6,24 +6,33 @@
# IMPORTANT: This is an initial version. I plan to integrate it better with
# ooo-build, see ooo-build/doc/test-ooo.txt for more details
-
-#TESTTOOL=/opt/openoffice.org2.0/program/testtool.bin
-export testToolBin=/usr/lib/ooo3/basis3.0/program/testtool.bin
-
-# where the qatesttool is stored (testcases)
-export testToolRoot=/test/OOo/qa/qatesttool
-
-# path to the user configuration directory
-export userConfigDir=$HOME/.ooo3/
+if test `uname -o` = "Cygwin" ; then
+ export killall="/usr/bin/PsTools/pskill.exe"
+ export testToolBin="/cygdrive/c/Program Files/OpenOffice.org 3/Basis/program/testtool.exe"
+ # where the qatesttool is stored (testcases)
+ export testToolRoot="c:/cygwin/home/Mick/OOo/qa/qatesttool/"
+elif test `uname -i` = "i386" ; then
+ export killall="killall -9"
+ export testToolBin="/usr/lib/ooo3/basis3.1/program/testtool.bin"
+ export testToolRoot="/home/mick/OOo/qa/qatesttool"
+else
+ export killall="killall -9"
+ export testToolBin="/opt/ooo-dev/basis3.1/program/testtool.bin"
+ export testToolRoot="/home/mick/OOo/qa/qatesttool"
+fi
# all tests will be skipped until this script name is found
# define empty string to do not skip any test
SKIP_TO_TEST=
#SKIP_TO_TEST=writer/loadsave/w_imp_bin.bas
+# helper scripts
+export testToolExitOfficeBas="$testToolRoot/global/tools/closeoffice.bas"
+export testToolResetOfficeBas="$testToolRoot/global/tools/resetoffice.bas"
+
usage()
{
- echo "This script sta rt the qatesttool scripts from the given list"
+ echo "This script start the qatesttool scripts from the given list"
echo
echo "Usage: ${0##*/} test.list [test.blacklist]"
echo
@@ -87,27 +96,44 @@ is_blacklisted()
run_test()
{
test="$1"
- # first, remove the potentially broken user configuration
- rm -rf "$userConfigDir"
+
"$testToolBin" -run "$test"
sleep 5
- killall soffice.bin
- # just to be sure
+ $killall testool.exe
+ $killall testool.bin
+ $killall soffice.exe
+ $killall soffice.bin
sleep 2
- killall -9 soffice.bin
+ "$testToolBin" -run "$testToolResetOfficeBas"
+ sleep 5
+ $killall testool.exe
+ $killall testool.bin
+ $killall soffice.exe
+ $killall soffice.bin
+ sleep 2
+ rm ~/OOo/qa/logs/resetoffice.res
+ "$testToolBin" -run "$testToolExitOfficeBas"
+ sleep 5
+ $killall testool.exe
+ $killall testool.bin
+ $killall soffice.exe
+ $killall soffice.bin
+ sleep 2
+ rm ~/OOo/qa/logs/closeoffice.res
}
-echo "Checking userConfigDir variable..."
-run_test "$testToolRoot/global/tools/closeoffice.bas"
-if ! test -d "$userConfigDir" ; then
- echo "Error: The user config directory does not exists: $userConfigDir"
- echo " Please, check the setting of the variable userConfigDir in $0"
- exit 1;
-fi
-
# will we skip any test?
test -n "$SKIP_TO_TEST" && skip_tests=true || skip_tests=false
+# kill any runnign testool and OOo
+$killall testool.bin
+$killall testool.exe
+$killall soffice.bin
+$killall soffice.exe
+
+# reset OOo configuration
+run_test "$testToolResetOfficeBas"
+
for test in $testList ; do
if is_blacklisted $test ; then
echo "Skipping blacklisted test $test..."
diff --git a/scratch/qa/ooo-test-wrappers b/scratch/qa/ooo-test-wrappers
new file mode 100755
index 0000000..9e8bf09
--- /dev/null
+++ b/scratch/qa/ooo-test-wrappers
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Please close OOo window manually when it appears for about 2-5 seconds"
+for i in $(rpm -ql $(rpm -qa | grep -i openoffice) |grep -ie /usr/bin/ -e /usr/sbin -e /usr/X11R6/bin/ |grep -i oo|grep -v convert|sort);do
+echo $i
+$i
+sleep 8
+done
+
More information about the ooo-build-commit
mailing list