lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Headless GUI tests


From: Greg Chicares
Subject: Re: [lmi] Headless GUI tests
Date: Sat, 13 Nov 2021 18:24:25 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 11/13/21 5:37 PM, Greg Chicares wrote:

[...need to ^C because GUI test doesn't terminate normally...]

> On 11/13/21 12:54 PM, Vadim Zeitlin wrote:
> 
>>  I think this happens because some top level window (a dialog which could
>> have been shown later than expected, maybe?) must have remained open,
>> preventing the program from exiting. It is a bit difficult to check this,
>> as you can't look on the Xvfb screen, of course.
> 
> I'm looking into 'xwud' in debian's 'x11-apps' package, which
> looks like it might actually let us examine the Xvfb screen.

It shows only a blank screen [nope--see below: 'xwud' is really useful].

I tested it thus [don't point out the mistake yet--see below]:

  Xvfb :1 -screen 0 1280x960x24 -fbdir /var/tmp &
  xvfb-run wine ./wx_test --ash_nazg  --data_path=/opt/lmi/data --test 
paste_census
  NOTE: starting the test suite
  paste_census: started
  paste_census: ERROR (Assertion '(lmi::ssize(grid_window->GetSelectedRows())) 
== (1)' failed (expected 1 vs observed 0). [wx_test_paste_census.cpp : 269] )
  time=197ms (for all tests)
  FAILURE: 1 out of 1 test failed.
  ^CX connection to :99 broken (explicit kill or server shutdown).

running this in a different terminal, in the same 'bullseye' chroot:

  xwud -in /var/tmp/Xvfb_screen0 
  ls -l /var/tmp/Xvfb_screen0
  -rw-rw-r-- 1 greg greg 4918432 Nov 13 17:46 /var/tmp/Xvfb_screen0

I ran 'xwud'
 - immediately after starting the 'xvfb-run' command, and
 - after waiting for it to print error messages, and
 - after hitting ^C
but all I ever got was a blank screen [not...].

But...wait! That's why it's important to give detailed reports and
copy and paste actual commands...and read everything again before
pressing "Send". Running 'Xvfb' and then 'xvfb-run' is wrong, because
'xvfb-run' starts its own 'Xvfb' session. (I would edit out my mistake
to establish an illusion of expertise, but fear that I'd botch the edit.)
Instead:

  /opt/lmi/bin[0]$Xvfb :1 -screen 0 1280x960x24 -fbdir /var/tmp &
  [1] 379820
  /opt/lmi/bin[0]$time DISPLAY=:1 /opt/lmi/src/lmi/gui_test.sh
  NOTE: starting the test suite
  paste_census: ERROR (Assertion '(lmi::ssize(grid_window->GetSelectedRows())) 
== (1)' failed (expected 1 vs observed 0). [wx_test_paste_census.cpp : 269] )
  pdf_census: ERROR (Assertion 'composite_pdf.exists()' failed. 
[wx_test_pdf_create.cpp : 160] )
  pdf_illustration: ERROR (Assertion failure: Expected edit cell dialog to test 
$1,000,000,000 scaling was not shown. [file /opt/lmi/src/lmi/wx_test_new.hpp, 
line 62, in do_new_illustration()].)
  validate_output_census: ERROR (Assertion failure: Expected case defaults 
dialog was not shown. [file /opt/lmi/src/lmi/wx_test_validate_output.cpp, line 
150, in init_test_census()].)
  validate_output_illustration: ERROR (Assertion failure: Expected illustration 
properties dialog was not shown. [file /opt/lmi/src/lmi/wx_test_new.hpp, line 
62, in do_new_illustration()].)
  validate_output_mec: ERROR (Assertion failure: Expected new MEC parameters 
dialog was not shown. [file /opt/lmi/src/lmi/wx_test_validate_output.cpp, line 
573, in run()].)
  FAILURE: 6 out of 25 tests failed.
  NOTE: 4 tests were skipped

and now, after all the output above:
  xwud -in /var/tmp/Xvfb_screen0
shows something that may actually be useful. What I see is:
 - a small background window with a "File Census Test Window" menubar.
     and "Added cell number 7." on its statusbar; and, on top,
 - a foreground window saying:
     "[blue '?' icon] Do you want to save changes to unnamed15?"
     "Yes No Cancel"
Everything else is just a black background, except that an "x" graphic
(black with white border, looking much like a close-button graphic),
several lines below the word "number".

If I run that 'xwud' command repeatedly while the GUI test is
running, I see numerous screenshots that look like what I'd normally
expect when running non-headlessly.

If I wait a couple minutes after "NOTE: 4 tests were skipped", then
I still see the "Yes No Cancel" stuff described above.

If I run 'xwud' after ^C-ing the GUI test, I see a black screen.

This may be enough information for me to find and fix whatever is
going wrong. And it may be worth doing that even though no such
problem appears today with 'bookworm', because a latent defect
could resurface in 'trixie', or with any 'wine' upgrade.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]