From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21023 invoked by alias); 4 Jan 2005 18:08:57 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 20970 invoked from network); 4 Jan 2005 18:08:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Jan 2005 18:08:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j04I8km2016935 for ; Tue, 4 Jan 2005 13:08:46 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j04I8kr19395; Tue, 4 Jan 2005 13:08:46 -0500 Received: from tortoise.toronto.redhat.com (IDENT:U2FsdGVkX1/0cZtM6pzJaOye+FI+5xKSVqfT2xGN0e8@tortoise.toronto.redhat.com [172.16.14.92]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id j04I8koS003210; Tue, 4 Jan 2005 13:08:46 -0500 Subject: Re: Patch: GUI testing framework From: Thomas Fitzsimmons To: Thomas Zander Cc: mauve-discuss@sources.redhat.com In-Reply-To: <200501040930.18433.zander@kde.org> References: <1104795399.6374.117.camel@tortoise.toronto.redhat.com> <200501040930.18433.zander@kde.org> Content-Type: multipart/mixed; boundary="=-86SB2DX6OcTM2NxFNfkH" Date: Tue, 04 Jan 2005 18:08:00 -0000 Message-Id: <1104862126.6374.150.camel@tortoise.toronto.redhat.com> Mime-Version: 1.0 X-SW-Source: 2005-q1/txt/msg00005.txt.bz2 --=-86SB2DX6OcTM2NxFNfkH Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 1234 On Tue, 2005-01-04 at 09:30 +0100, Thomas Zander wrote: > On Tuesday 04 January 2005 00:36, Thomas Fitzsimmons wrote: > > I would like to rely on the metacity window manager, since it handles > > inset sizing correctly. > > If you feel the KWin WM does not, please make sure to inform the KWin > developers where they don't follow the spec. > I'd find it slightly amuzing if KDE does not since at least the main > developer is also part of the spec lead.. > It's not that they don't follow the spec, it's just that they don't interpret it as strictly as metacity does. See this thread for the original discussion: http://mail.gnome.org/archives/wm-spec-list/2003-December/msg00005.html > If you don't want to create a bugreport, please tell me exactly what the > problem is (a reproducable c/c++ testcase would be great) so I can > contact Lubos about this. > Try running gnu.testlet.java.awt.Robot.mouseMove under KWin and then under Metacity. I've attached a new patch that makes it easier to override the default window manager. Tom 2005-01-03 Thomas Fitzsimmons * batch_run: Invoke Xvfb and metacity if GUI key is specified. * choose: Handle GUI tag. * README: Add section on GUI tests. --=-86SB2DX6OcTM2NxFNfkH Content-Description: Content-Disposition: inline; filename=mauve-gui-framework2.patch Content-Type: text/x-patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 2994 Index: README =================================================================== RCS file: /cvs/mauve/mauve/README,v retrieving revision 1.18 diff -u -r1.18 README --- README 12 Aug 2004 15:11:12 -0000 1.18 +++ README 4 Jan 2005 18:05:58 -0000 @@ -172,6 +172,17 @@ ================================================================ +Graphical tests that display windows and accept input are marked with +the GUI tag. GUI tests are not included in the default list of tags. +If the GUI tag does appear in KEYS, batch_run will spawn an Xvfb +process, set DISPLAY to that X server and run the +graphical/interactive tests there. By default, metacity is run in +Xvfb; use the WM environment variable to run a different window +manager. If you'd rather run the tests directly on your desktop, set +SHOW_GUI_TESTS=1. + +================================================================ + The test harness can also ignore known failures. Simply create a file 'xfails' in the directory where the tests are being run which contains 'FAIL:' entries from previous test runs. The order of the Index: batch_run =================================================================== RCS file: /cvs/mauve/mauve/batch_run,v retrieving revision 1.5 diff -u -r1.5 batch_run --- batch_run 19 Nov 2004 10:09:28 -0000 1.5 +++ batch_run 4 Jan 2005 18:05:58 -0000 @@ -63,6 +63,32 @@ # Generate test classes list ./choose-classes . "$KEYS" +case $KEYS in + *GUI*) + + XVFB=`which Xvfb` + if test "x$WM" = "x"; then + WM=`which metacity` + fi + + if test -z "$SHOW_GUI_TESTS"; then + if test -z $XVFB; then + echo "warning: Xvfb not found on PATH. Showing GUI tests on main desktop..." + elif test -z $WM; then + echo "warning: metacity not found on PATH. Showing GUI tests on main desktop..." + else + export DISPLAY=:57 + echo localhost > Xvfb.cfg + $XVFB :57 -auth Xvfb.cfg > /dev/null 2>&1 & + XVFB_PID=$! + $WM > /dev/null 2>&1 & + WM_PID=$! + rm -f Xvfb.cfg + fi + fi + ;; +esac + # Compile and run all the tests for testclass in `cat test_classes`; do # Get all needed java sources @@ -81,3 +107,13 @@ echo "FAIL: $testclass COMPILE FAILED" fi done + +case $KEYS in + *GUI*) + + # killing Xvfb also kills the window manager process + if test ! -z "$XVFB_PID"; then + kill $XVFB_PID > /dev/null 2>&1 + fi + ;; +esac Index: choose =================================================================== RCS file: /cvs/mauve/mauve/choose,v retrieving revision 1.25 diff -u -r1.25 choose --- choose 14 Oct 2004 06:53:07 -0000 1.25 +++ choose 4 Jan 2005 18:05:58 -0000 @@ -69,6 +69,10 @@ # You can't specify this. : ;; + GUI) + tags="$tags GUI $i" + test -z "$seen_dashdash" && spectags="$spectags $i" + ;; JAVA2) tags="$tags JDK1.0 JDK1.1 JDK1.2 $i" test -z "$seen_dashdash" && spectags="$spectags $i" --=-86SB2DX6OcTM2NxFNfkH--