----- Original Message -----
> On 03/29/18 20:40, Bastien Nocera-san wrote:
>>
>>
>> ----- Original Message -----
>>> I'd like to run gnome-shell with koji for the GUI test.
>>> I referred
>>>
https://fedoraproject.org/wiki/PackageMaintainers/GraphicalTests
>>>
>>> +BuildRequires: xorg-x11-drv-dummy
>>> +BuildRequires: gnome-session
>>> +BuildRequires: gnome-shell
>>>
>>> +$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile
>>> ./xorg.log -config ./xorg.conf -configdir . :99 &
>>> +export DISPLAY=:99
>>> +gnome-session &
>>>
>>> When I run gnome-session with koji,
>>> /usr/libexec/gnome-session-check-accelerated outputs an error:
>>> gnome-session-binary[18713]: WARNING: software acceleration check failed:
>>> Child process exited with code 1
>>> Unable to init server: Could not connect: Connection refused
>>>
>>> I can run gnome-session on console with the same way but koji outputs the
>>> above error.
>>> Do you have any ideas to succeed the acceleration check?
>>
>> What's $Xorg supposed to be?
>
> It's described in the above GraphicalTests wiki page:
>
> if [ -x /usr/libexec/Xorg ]; then
> Xorg=/usr/libexec/Xorg
> else
> Xorg=/usr/libexec/Xorg.bin
> fi
I'm pretty sure that's not going to work if the mock build environment
doesn't
have access to a real device. Use Xvfb instead.
>> For what it's worth, I would advise you to implement the test suite
>> upstream,
>> following the example of the one in gnome-settings-daemon (which also has a
>> number of tests that will exercise gnome-session).
>>
>> This one uses Xvfb to run a full gnome-session, mutter and gsd-power
>> included,
>> and mocks additional daemons and devices using dbusmock.
>
> I may not understand your suggestion.
> I have the test suites in ibus core and ibus engines and I'd like to run them
> with koji.
> I'm thinking using koji has many benefits.
> E.g.
> 1. I sometimes cannot establish desktop environment in Fedora alpha stage
> because of graphics or virtual host relative problems but koji succeeded to
> build modules.
> 2. Release engineers build all modules in the Fedora mass build stage and
> then the test suites are also tested automatically.
> 3. I can run the test suites with the scratch build with the latest Fedora.
>
> Currently I run the test suites in making tarballs in the current Fedora by
> manual however I think the test is not enough.
I'm saying you should:
- Implement it upstream
- Run it in your spec file so that koji does run it
>> See:
>>
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/tree/master/tests
>> for the common files.
>>
>> And for the xsettings and power plugin tests:
>>
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/blob/master/plugins/...
>>
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/blob/master/plugins/...
>>
>>> However I'd like to run GNOME Wayland finally instead of Xorg but I
don't
>>> know how to run gnome-session on console.
>>
>> There's currently no way to run a headless GNOME Wayland session.
>
> Ah, I see. Thank you.
>
> If I cannot run GNOME with koji, I will use blackbox with koji.
You can run GNOME with koji, it's just that the test helpers you're using
expect a VM or real hardware.
Using something similar to gsdtestcase.py you can run a test suite both upstream
and then downstream during packaging, without the need for a real graphics card
being available, and the session not leaking into your development environment.
OK, I see you suggest to upstream the test suite including running gnome-session.
I put plugins/xsettings/test.py and gsdtestcase.py in a same directory and tried `python
test.py` on console but seems gnome-session-check-accelerated
failed.
I'm not sure how to run the test suite.
I also tried Xvfb directly with koji but I got the same error:
+ export DISPLAY=:99
+ DISPLAY=:99
+ sleep 5
+ /usr/bin/Xvfb :99 -noreset +extension GLX +extension RANDR +extension RENDER -screen 0
1280x1024x24
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
+ sleep 30
+ gnome-session
gnome-session-binary[22848]: WARNING: software acceleration check failed: Child process
exited with code 1
Unable to init server: Could not connect: Connection refused
** (gnome-session-failed:22873): WARNING **: 09:33:22.349: Cannot open display:
/var/tmp/rpm-tmp.i5m88V: line 55: 22848 Terminated gnome-session