"Dimitrie O. Paun" <[EMAIL PROTECTED]> writes:

> On Wed, 27 Aug 2003, Jakob Eriksson wrote:
>
>> I really was looking forward to write a testing
>> application that runs all the tests.
>
> Yes, that would be very nice indeed. Such a test shell
> should be something like the JUnit stuff. Here are few
> things that I'd want in such an app: [...]

Well, much less than what you want, but maybe something:

http://afavant.elte.hu/~wferi/wine

Basically, I cross-compiled the tests I could (all except
dsound), and run the attached script, which created the zip
file on the above page.  A testing soul have to create a
directory, download a file, unzip it, run a .BAT file, and
mail a .TXT file.  Cleanup is optional.  I will write a
script which digests the resulting textfile and renders some
HTML.  What do you think?
                                              Feri.
#!/bin/bash
#
# Zip up the crosstests and a .BAT file to run them
#
# Copyright (C) 2003 Alexandre Julliard, Ferenc Wagner
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

# first determine the directory that contains the app itself

appdir=""
case "$0" in
  */*)
    # $0 contains a path, use it
    appdir=`dirname "$0"`
    ;;
  *)
    # no directory in $0, search in PATH
    saved_ifs=$IFS
    IFS=:
    for d in $PATH
    do
      IFS=$saved_ifs
      if [ -x "$d/$0" ]
      then
        appdir="$d"
        break
      fi
    done
    ;;
esac

# now find the top-level directory of the source tree

if [ -x "$appdir/server/wineserver" ]
then topdir="$appdir"
elif [ -x "$appdir/../server/wineserver" ]
then topdir="$appdir/.."
elif [ -x "$appdir/../../server/wineserver" ]
then topdir="$appdir/../.."
elif [ -x "$appdir/../../../server/wineserver" ]
then topdir="$appdir/../../.."
else
  echo "$0: could not locate Wine source tree"
  exit 1
fi

# setup the environment

topdir=`cd "$topdir" && pwd`
batfile=runtests.bat
results=results.txt
zipfile=tests.zip
zipcommand="zip -jq $zipfile $batfile"

echo "@echo off" >$batfile
echo "del $results" >>$batfile
testnum=0
for makefile in $(find $topdir -path */tests/Makefile.in)
  do
  eval $(make -qpf $makefile 2>/dev/null | egrep "CTESTS|TESTDLL" | sed -e 's/ = /="/;s/$/"/;s/\.c//g')
  exename=${makefile%Makefile.in}${TESTDLL%.dll}_crosstest.exe
  if [ -x $exename ]
      then
      zipcommand="$zipcommand $exename"
      exename=$(basename $exename)
      for testname in $CTESTS
        do
        testnum=$(($testnum+1))
        echo "echo $TESTDLL:$testname (test $testnum)" >>$batfile
        echo "echo $TESTDLL:$testname (test $testnum) >>$results" >>$batfile
        echo "$exename $testname >>$results" >>$batfile
      done
      else
      echo "Missing file: $exename"
  fi
done
echo "echo Testing finished.  Results are in $results" >>$batfile
rm -f $zipfile
echo -n "Creating archive..."
eval $zipcommand
echo " packed $testnum tests in $zipfile"

Reply via email to