all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Simulating X-Server in tests
@ 2018-03-01 11:29 Björn Höfling
  2018-03-01 14:18 ` Danny Milosavljevic
  2018-03-01 14:20 ` Hartmut Goebel
  0 siblings, 2 replies; 5+ messages in thread
From: Björn Höfling @ 2018-03-01 11:29 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Is there a way to simulate "X" in my packages tests?

I have a bunch of tests that fail like this:

 3/15 Test  #3: advancedrenametest ...............***Failed    0.43 sec
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/guix-build-digikam-
qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simulating X-Server in tests
  2018-03-01 11:29 Simulating X-Server in tests Björn Höfling
@ 2018-03-01 14:18 ` Danny Milosavljevic
  2018-03-01 14:20 ` Hartmut Goebel
  1 sibling, 0 replies; 5+ messages in thread
From: Danny Milosavljevic @ 2018-03-01 14:18 UTC (permalink / raw)
  To: Björn Höfling; +Cc: guix-devel

Hi Björn,

On Thu, 1 Mar 2018 12:29:36 +0100
Björn Höfling <bjoern.hoefling@bjoernhoefling.de> wrote:

> Is there a way to simulate "X" in my packages tests?
> 
> I have a bunch of tests that fail like this:
> 
>  3/15 Test  #3: advancedrenametest ...............***Failed    0.43 sec
> QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/guix-build-digikam-
> qt.qpa.screen: QXcbConnection: Could not connect to display 
> Could not connect to any X display.

Please first try (setenv "QT_QPA_PLATFORM" "offscreen").

If that doesn't help then start Xvfb (examples are in gnu/packages/gnome.scm), an X server.

(Each build runs in an isolated container so it's fine)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simulating X-Server in tests
  2018-03-01 11:29 Simulating X-Server in tests Björn Höfling
  2018-03-01 14:18 ` Danny Milosavljevic
@ 2018-03-01 14:20 ` Hartmut Goebel
  2018-03-01 15:23   ` Björn Höfling
  2018-03-16 14:58   ` Björn Höfling
  1 sibling, 2 replies; 5+ messages in thread
From: Hartmut Goebel @ 2018-03-01 14:20 UTC (permalink / raw)
  To: guix-devel

Am 01.03.2018 um 12:29 schrieb Björn Höfling:
>  3/15 Test  #3: advancedrenametest ...............***Failed    0.43 sec
> QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/guix-build-digikam-
> qt.qpa.screen: QXcbConnection: Could not connect to display 
> Could not connect to any X display.

For many Qt testsit's sufficient to set QT_QPA_PLATFORM=offscreen, some
require a running x11 server.
Please have a look at the packages in qt.scm and kde-framworks.scm for
examples of both and other necessary steps.

Missing XDG_RUNTIME_DIR is not an issue in most cases, but if it's required, there are also examples in qt.scm and kde-frameworks.scm.

HTH

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simulating X-Server in tests
  2018-03-01 14:20 ` Hartmut Goebel
@ 2018-03-01 15:23   ` Björn Höfling
  2018-03-16 14:58   ` Björn Höfling
  1 sibling, 0 replies; 5+ messages in thread
From: Björn Höfling @ 2018-03-01 15:23 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

On Thu, 1 Mar 2018 15:20:40 +0100
Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:

> Am 01.03.2018 um 12:29 schrieb Björn Höfling:
> >  3/15 Test  #3: advancedrenametest ...............***Failed    0.43
> > sec QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to
> > '/tmp/guix-build-digikam- qt.qpa.screen: QXcbConnection: Could not
> > connect to display Could not connect to any X display.  
> 
> For many Qt testsit's sufficient to set QT_QPA_PLATFORM=offscreen,
> some require a running x11 server.
> Please have a look at the packages in qt.scm and kde-framworks.scm for
> examples of both and other necessary steps.
> 
> Missing XDG_RUNTIME_DIR is not an issue in most cases, but if it's
> required, there are also examples in qt.scm and kde-frameworks.scm.

Thanks Hartmut and Danny,

I will give that a try.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simulating X-Server in tests
  2018-03-01 14:20 ` Hartmut Goebel
  2018-03-01 15:23   ` Björn Höfling
@ 2018-03-16 14:58   ` Björn Höfling
  1 sibling, 0 replies; 5+ messages in thread
From: Björn Höfling @ 2018-03-16 14:58 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

On Thu, 1 Mar 2018 15:20:40 +0100
Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:

> Am 01.03.2018 um 12:29 schrieb Björn Höfling:
> >  3/15 Test  #3: advancedrenametest ...............***Failed    0.43
> > sec QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to
> > '/tmp/guix-build-digikam- qt.qpa.screen: QXcbConnection: Could not
> > connect to display Could not connect to any X display.  
> 
> For many Qt testsit's sufficient to set QT_QPA_PLATFORM=offscreen,
> some require a running x11 server.
> Please have a look at the packages in qt.scm and kde-framworks.scm for
> examples of both and other necessary steps.

That did the trick.

Also, for another package without QT, Danny's trick with Xvfb helped.

Thanks,

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-16 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 11:29 Simulating X-Server in tests Björn Höfling
2018-03-01 14:18 ` Danny Milosavljevic
2018-03-01 14:20 ` Hartmut Goebel
2018-03-01 15:23   ` Björn Höfling
2018-03-16 14:58   ` Björn Höfling

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.