Hi, This is an attempt to create a standalone- and winehq_nb-dependent test for the open-source AbiWord 2.0.8 word processor. It can be downloaded from: http://ovh.dl.sourceforge.net/sourceforge/abiword/abiword-setup-2.0.8.exe Thanks, Thomas Kho 2006-04-12 Thomas Kho * packages/abiword_2.0/ run/abiword20 run/wine_abiword20 packages/Makefile.in run/Makefile.in: Added test for AbiWord 2.0.8 packages/Makefile.in | 3 packages/abiword_2.0/install/abiword_2.0.sh | 89 ++++++++++++++++++++++++ packages/abiword_2.0/package.conf | 102 ++++++++++++++++++++++++++++ packages/abiword_2.0/run/run.sh | 75 ++++++++++++++++++++ packages/abiword_2.0/run/test.conf | 62 +++++++++++++++++ run/Makefile.in | 4 - run/abiword20 | 2 run/wine_abiword20 | 4 + 8 files changed, 339 insertions(+), 2 deletions(-) Signed-off-by: Thomas Kho Index: packages/Makefile.in =================================================================== RCS file: /home/cxtest/cvs/cxtest/packages/Makefile.in,v retrieving revision 1.29 diff -u -r1.29 Makefile.in --- packages/Makefile.in 29 Mar 2006 11:58:38 -0000 1.29 +++ packages/Makefile.in 12 Apr 2006 21:47:06 -0000 @@ -96,7 +96,8 @@ framemaker70 \ framemaker71 \ directx \ - notepad + notepad \ + abiword_2.0 all: Makefile $(SUBDIRS) Index: run/Makefile.in =================================================================== RCS file: /home/cxtest/cvs/cxtest/run/Makefile.in,v retrieving revision 1.25 diff -u -r1.25 Makefile.in --- run/Makefile.in 29 Mar 2006 11:58:38 -0000 1.25 +++ run/Makefile.in 12 Apr 2006 21:47:06 -0000 @@ -53,7 +53,9 @@ wine_picasa \ picasa \ notepad \ - wine_notepad + wine_notepad \ + abiword20 \ + wine_abiword20 all: Makefile $(SUBDIRS) diff -Naur empty/install/abiword_2.0.sh packages/abiword_2.0/install/abiword_2.0.sh --- empty/install/abiword_2.0.sh 1969-12-31 16:00:00.000000000 -0800 +++ packages/abiword_2.0/install/abiword_2.0.sh 2006-04-12 14:40:10.000000000 -0700 @@ -0,0 +1,89 @@ +#!/bin/sh +#---------------------------------------------------------------------------- +# Auto generated cxtest script +# START OF SCRIPT HEADER -- DO NOT EDIT +#---------------------------------------------------------------------------- + +import_cxvar () +{ + if [ -x `dirname $0`/cxvar.sh ] ; then + cxvar=`dirname $0`/cxvar.sh + else + if [ -x `which cxvar.sh` ] ; then + cxvar=`which cxvar.sh` + else + echo Panic! Did not find cxvar.sh. Set your PATH perhaps? + exit 1 + fi + fi + + source $cxvar $cxvar +} +standalone_script='' +if [ -z "$BIN_DIR" ]; then + standalone_script=1 + import_cxvar +fi + +source $BIN_DIR/cxfunct.sh +parse_test_arguments "$@" +if [ -z "$WINEHQ_DIR" ]; then + winehq_dir +fi +find_wine +#---------------------------------------------------------------------------- +# END OF SCRIPT HEADER -- PLACE AUTOMATED SCRIPTING CODE BELOW +#---------------------------------------------------------------------------- + +exe_file=`find_windows_software "abiword-setup-2.0.8.exe"` +if [ $? -ne 0 ]; then + echo "[ERROR: UNABLE TO FIND FILE 'abiword-setup-2.0.8.exe' IN $WIN_SOFTWARE_DIR] - $0: $LINENO" + exit 1 +fi +$WINE "$exe_file" >> $pipe_dir 2>&1 & +send_click find --window "Installer Language" --timeout 42000 +send_click --winewindow button1 --timeout 18000 --position 43x12 \ + --winclass "#32770" --wintitle "Installer Language" \ + --ctrlclass "Button" --ctrlcaption "OK" --ctrlid 1 +send_click find --window "AbiWord 2.0.8 Setup" --timeout 24000 +send_click --winewindow button1 --timeout 18000 --position 39x12 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup" \ + --ctrlclass "Button" --ctrlcaption "&Next >" --ctrlid 1 +send_click --winewindow find --timeout 32000 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Static" --ctrlcaption "License Agreement" --ctrlid 1037 +send_click --winewindow button1 --timeout 8000 --position 43x13 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Next >" --ctrlid 1 +send_click --winewindow find --timeout 10000 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Static" --ctrlcaption "Choose Components" --ctrlid 1037 +send_click --winewindow button1 --timeout 6000 --position 44x13 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Next >" --ctrlid 1 +send_click --winewindow find --timeout 6000 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Static" --ctrlcaption "Choose Install Location" --ctrlid 1037 +send_click --winewindow button1 --timeout 6000 --position 40x12 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Next >" --ctrlid 1 +send_click --winewindow find --timeout 8000 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Static" --ctrlcaption "Choose Start Menu Folder" --ctrlid 1037 +send_click --winewindow button1 --timeout 6000 --position 31x13 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Next >" --ctrlid 1 +send_click --winewindow find --timeout 204000 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Static" --ctrlcaption "Installation Complete" --ctrlid 1037 +send_click --winewindow button1 --timeout 6000 --position 38x12 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Next >" --ctrlid 1 +send_click --winewindow button1 --timeout 10000 --position 62x7 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Run AbiWord 2.0.8" --ctrlid 1203 +send_click --winewindow button1 --timeout 6000 --position 38x11 \ + --winclass "#32770" --wintitle "AbiWord 2.0.8 Setup " \ + --ctrlclass "Button" --ctrlcaption "&Finish" --ctrlid 1 + +exit 0 diff -Naur empty/package.conf packages/abiword_2.0/package.conf --- empty/package.conf 1969-12-31 16:00:00.000000000 -0800 +++ packages/abiword_2.0/package.conf 2006-04-12 14:46:09.000000000 -0700 @@ -0,0 +1,102 @@ +#---------------------------------------------------------------------------- +# package.conf +# Package: abiword_2.0 +# Auto generated package configuration file. Variables below specify +# what scripts and executables are used during package installation. +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Copyright 2006 by Google (Thomas Kho) +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# INSTALL_SCRIPT +# The automated install script for a package which sends the mouse clicks +# and keystrokes. This variable MUST be declared and the file it +# specifies should be located in the directory 'install' +# --> abiword_2.0/install/ +#---------------------------------------------------------------------------- +INSTALL_SCRIPT="abiword_2.0.sh" + +#---------------------------------------------------------------------------- +# ISO_NAME +# Name of iso to be mounted before installation. Iso is located +# in the directory (or subdirectories) specified by $WIN_SOFTWARE_DIR. +# If not set, no iso is mounted +#---------------------------------------------------------------------------- +ISO_NAME="" + +#---------------------------------------------------------------------------- +# DEPENDENCY +# The other packages and tests that must have been successfully run +# before this package can be installed. Inherits parent dependencies. +# If spaces are present, must be used enclosed within double quotes. +# Format: dependencies are to be separated by a space. For logical 'OR' +# use the symbol '|' between entries *without any spaces*. Only +# one level of logic, parenthesis are not supported. +# Ex: DEPENDENCY="a b c|d|e" --> package install depends on a, b, and at +# least one of c, d, or e being installed. +#---------------------------------------------------------------------------- +DEPENDENCY="" + +#---------------------------------------------------------------------------- +# VER_HEADING +# Specifies that the package is a version of a product. Used so that +# multiple versions of the same product are not installed. Only one +# heading may be specified per package. +#---------------------------------------------------------------------------- +VER_HEADING="" + +#---------------------------------------------------------------------------- +# C4_APPID +# The CodeWeavers CrossOver Compatibility Center (C4) application id that +# applies to the app being installed/tested. Used to link database +# records to applications. Only one id may be specified per install/test. +# Tests that do not set a c4 appid inherit the package(install) appid. +# To find app ids, browse to: +# http://www.codeweavers.com/site/compatibility/ +#---------------------------------------------------------------------------- +C4_APPID="" + +#---------------------------------------------------------------------------- +# RECORD_MACHINE_LIAS +# Speed rating of the machine on which the install script was recorded +# (measured as the number of Loops In A Second through a trivial +# function). This value is used to calibrate clickat timeouts dynamically +# when an install/test is run, so that scripts report errors instead of +# short timeouts. Do not change this value unless you are re-recording +# the install script for this package on your machine. +#---------------------------------------------------------------------------- +RECORD_MACHINE_LIAS="124667" + +#---------------------------------------------------------------------------- +# MULT_RUN +# Specifies whether this install can be run multiple times for one user. +# Multiple runs of the package installation script will only be allowed +# if MULT_RUN is set to "YES" or "yes". +#---------------------------------------------------------------------------- +MULT_RUN="NO" + +#---------------------------------------------------------------------------- +# Environment Variable Export +# Place the environment variables you wish to export for this package +# below. Use the format: +# export ="" +# Do not use spaces in the or before/after the '='. Variables +# exported here will be exported for the package installation and all +# package tests. +#---------------------------------------------------------------------------- diff -Naur empty/run/run.sh packages/abiword_2.0/run/run.sh --- empty/run/run.sh 1969-12-31 16:00:00.000000000 -0800 +++ packages/abiword_2.0/run/run.sh 2006-04-12 14:40:48.000000000 -0700 @@ -0,0 +1,75 @@ +#!/bin/sh +#---------------------------------------------------------------------------- +# Auto generated cxtest script +# START OF SCRIPT HEADER -- DO NOT EDIT +#---------------------------------------------------------------------------- + +import_cxvar () +{ + if [ -x `dirname $0`/cxvar.sh ] ; then + cxvar=`dirname $0`/cxvar.sh + else + if [ -x `which cxvar.sh` ] ; then + cxvar=`which cxvar.sh` + else + echo Panic! Did not find cxvar.sh. Set your PATH perhaps? + exit 1 + fi + fi + + source $cxvar $cxvar +} +standalone_script='' +if [ -z "$BIN_DIR" ]; then + standalone_script=1 + import_cxvar +fi + +source $BIN_DIR/cxfunct.sh +parse_test_arguments "$@" +if [ -z "$WINEHQ_DIR" ]; then + winehq_dir +fi +find_wine +#---------------------------------------------------------------------------- +# END OF SCRIPT HEADER -- PLACE AUTOMATED SCRIPTING CODE BELOW +#---------------------------------------------------------------------------- + +$WINE "C:\Program Files\AbiSuite2\AbiWord\bin\AbiWord.exe" >> $pipe_dir 2>&1 & +send_click find --window "Untitled1 - AbiWord" --timeout 20000 +send_keystroke "\\a+h\\a-a" +send_click --winewindow button1 --timeout 30000 --position 16x14 \ + --winclass "AbiSource_About" --wintitle "About AbiWord" \ + --ctrlclass "Button" --ctrlcaption "OK" --ctrlid 1 +send_keystroke "This is a test to verify that AbiWord runs successfully" +send_keystroke "\\c+h\\c-" +send_keystroke "test\\tsimple test" +send_click --winewindow button1 --timeout 14000 --position 58x10 \ + --winclass "#32770" --wintitle "Replace - Untitled1 *" \ + --ctrlclass "Button" --ctrlcaption "Replace &All" --ctrlid 1003 +send_click --winewindow button1 --timeout 8000 --position 23x13 \ + --winclass "#32770" --wintitle "AbiWord" \ + --ctrlclass "Button" --ctrlcaption "&OK" --ctrlid 1 +send_click --winewindow button1 --timeout 8000 --position 54x15 \ + --winclass "#32770" --wintitle "Replace - Untitled1 *" \ + --ctrlclass "Button" --ctrlcaption "Cancel" --ctrlid 2 +send_keystroke "\\c+f\\c-" +send_keystroke "simple test" +send_click --winewindow button1 --timeout 10000 --position 57x10 \ + --winclass "#32770" --wintitle "Find - Untitled1 *" \ + --ctrlclass "Button" --ctrlcaption "&Find Next" --ctrlid 1001 +send_click --winewindow button1 --timeout 8000 --position 57x12 \ + --winclass "#32770" --wintitle "Find - Untitled1 *" \ + --ctrlclass "Button" --ctrlcaption "&Find Next" --ctrlid 1001 +send_click --winewindow button1 --timeout 6000 --position 21x14 \ + --winclass "#32770" --wintitle "AbiWord" \ + --ctrlclass "Button" --ctrlcaption "&OK" --ctrlid 1 +send_click --winewindow button1 --timeout 6000 --position 56x12 \ + --winclass "#32770" --wintitle "Find - Untitled1 *" \ + --ctrlclass "Button" --ctrlcaption "Cancel" --ctrlid 2 +send_keystroke "\\a+f\\a-q" +send_click --winewindow button1 --timeout 8000 --position 45x15 \ + --winclass "#32770" --wintitle "AbiWord" \ + --ctrlclass "Button" --ctrlcaption "&No" --ctrlid 7 + +exit 0 diff -Naur empty/run/test.conf packages/abiword_2.0/run/test.conf --- empty/run/test.conf 1969-12-31 16:00:00.000000000 -0800 +++ packages/abiword_2.0/run/test.conf 2006-04-12 14:47:00.000000000 -0700 @@ -0,0 +1,62 @@ +#---------------------------------------------------------------------------- +# test.conf +# Package: abiword_2.0 +# Test: run +# Auto generated test configuration file. Variables below specify +# what scripts and executables are used during package installation. +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# TEST_SCRIPT +# The automated install script for a package which sends the mouse clicks +# and keystrokes. This variable MUST be declared and the file it +# specifies should be located in the directory 'run' +# --> abiword_2.0/run/ +#---------------------------------------------------------------------------- +TEST_SCRIPT="run.sh" + +#---------------------------------------------------------------------------- +# DEPENDENCY +# The other packages and tests that must have been successfully run +# before this package can be installed. Inherits parent dependencies and +# depends on successful installation of the package in which it is located. +# If spaces are present, must be used enclosed within double quotes. +# To specify a package, list the package name. To specify a test, use +# the format :. +# Format: dependencies are to be separated by a space. For logical 'OR' +# use the symbol '|' between entries *without any spaces*. Only +# one level of logic, parenthesis are not supported. +# Ex: DEPENDENCY="a b c|d|e" --> package install depends on a, b, and at +# least one of c, d, or e being installed. +#---------------------------------------------------------------------------- +DEPENDENCY="" + +#---------------------------------------------------------------------------- +# C4_APPID +# The CodeWeavers CrossOver Compatibility Center (C4) application id that +# applies to the app being installed/tested. Used to link database +# records to applications. Only one id may be specified per install/test. +# If it is not set, the c4 appid inherits the package(install) appid. +# To find app ids, browse to: +# http://www.codeweavers.com/site/compatibility/ +#---------------------------------------------------------------------------- +C4_APPID="" + +#---------------------------------------------------------------------------- +# RECORD_MACHINE_LIAS +# Speed rating of the machine on which the install script was recorded +# (measured as the number of Loops In A Second through a trivial +# function). This value is used to calibrate clickat timeouts dynamically +# when an install/test is run, so that scripts report errors instead of +# short timeouts. Do not change this value unless you are re-recording +# the install script for this package on your machine. +#---------------------------------------------------------------------------- +RECORD_MACHINE_LIAS="124667" + +#---------------------------------------------------------------------------- +# MULT_RUN +# Specifies whether this test can be run multiple times for one user. +# Multiple runs of the package installation script will only be allowed +# if MULT_RUN is set to "YES" or "yes". +#---------------------------------------------------------------------------- +MULT_RUN="YES" --- /dev/null 2006-03-21 17:30:22.644341250 -0800 +++ run/abiword20 2006-04-12 14:26:17.000000000 -0700 @@ -0,0 +1,2 @@ +INSTALL abiword_2.0 +TEST abiword_2.0:run --- /dev/null 2006-03-21 17:30:22.644341250 -0800 +++ run/wine_abiword20 2006-04-12 14:29:58.000000000 -0700 @@ -0,0 +1,4 @@ +USER wine_abiword20 +INSTALL winehq_nb +INSTALL abiword_2.0 +TEST abiword_2.0:run