Bug 915191 - Display env. is not set
Summary: Display env. is not set
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: tycho
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alexander Kurtakov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-25 08:22 UTC by Krzysztof Daniel
Modified: 2015-02-18 13:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 13:50:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Krzysztof Daniel 2013-02-25 08:22:15 UTC
While debugging Bug 913490 it was discovered that tycho/maven environment does not have the DISPLAY variable set, hence it is impossible to run UI tests (at least for swt) using maven surefire.

exporting the DISPLAY as a part of build seems to workaround the issue. So does skipping tests.

This issue may have a lot of impact for many Eclipse related packages.

Comment 1 Mikolaj Izdebski 2013-02-25 08:41:49 UTC
I don't see how this bug relates to xmvn. XMvn doesn't do anything about $DISPLAY or environment.

Are you trying to run this in mock (or koji)? If yes then there are some caveats with $DISPLAY (in general) and eclipse. See bugs #845712 and #845706 for information how to properly run eclipse in mock (and preserve $DISPLAY and $XAUTHORITY).

Comment 2 Krzysztof Daniel 2013-02-25 09:24:18 UTC
I'm not running Eclipse by myself. I'm executing SWT tests, which run an Eclipse SWT application - it can't be even initialized, because $DISPLAY is missing. 

It used to work in exactly the same way in F18, but the build failed during f19 rebuild process.

I think this is somewhat similar to the issue we had later last week - that MAVEN_OPTS were not passed to the maven when mvn-rpmbuild was invoked.

Comment 3 Mikolaj Izdebski 2013-02-25 10:08:24 UTC
I still don't see why this has anything to do with xmvn.

How are you running your tests? How are the tests executing eclipse? Is mock involved? Is Koji involved? What is your content of $DISPLAY?

You really need to provide some additional information or there is precisely nothing I can do about this report.

Comment 4 Krzysztof Daniel 2013-02-25 10:33:07 UTC
The exact reproduction steps are:
(1) fedpkg clone eclipse-gef
(2) remove -Dmaven.test.skip=true
(3) fedpkg build --scratch --srpm

the content of $DISPLAY is :0.

The command that invokes the build is 
mvn-rpmbuild clean install -f org.eclipse.gef.releng/pom.xml -Dmaven.local.mode=true  -DskipTychoVersionCheck 
and does work in f18, but not in f19. The error message is gtk_init_check() failed.

Adding 
export DISPLAY=:0 fixes tests.

tycho-surefire-plugin is used to execute certain TestSuite.

Running the test command directly in a terminal, without a maven stack, works fine.

Comment 5 Mikolaj Izdebski 2013-02-25 13:28:40 UTC
I just did a scratch build of eclipse-gef with the following patch applied:

diff --git a/eclipse-gef.spec b/eclipse-gef.spec
index 2c0bf39..de1d6d5 100644
--- a/eclipse-gef.spec
+++ b/eclipse-gef.spec
@@ -79,7 +79,8 @@ if [ ! -z "$JARS" ]; then
 fi
 
 %build
-mvn-rpmbuild clean install -f org.eclipse.gef.releng/pom.xml -Dmaven.local.mode=true -Dmaven.test.skip=true -DskipTychoVersionCheck
+echo XXX DISPLAY is '"'"$DISPLAY"'"'
+mvn-rpmbuild clean install -f org.eclipse.gef.releng/pom.xml -DskipTychoVersionCheck
 
 pushd org.eclipse.gef.repository/target/repository/features/
 for f in `ls`; do \


The results were:

+ echo XXX DISPLAY is '""'
XXX DISPLAY is ""

Full build log is available here: http://kojipkgs.fedoraproject.org//work/tasks/2912/5052912/build.log

As I said, xmvn or maven-local have nothing to do with DISPLAY, that's mock unsetting DISPLAY. DISPLAY variable was unset even before mvn-rpmbuild was called.

Closing as NOTABUG.

Comment 6 Krzysztof Daniel 2013-02-26 07:10:21 UTC
Ok, it's a bug, or rather, improvement in maven-surefire plugin.

It looks like a test failing because of missing DISPLAY is now counted as a failed one, although previously it was a not-executed one.

Therefore it's necessary to set up X for mvn-rpmbuild/tycho/maven-surefire/eclipse plugin tests/

I'm reopening this bug to keep the issue on the table.

Comment 7 Mat Booth 2013-03-01 10:24:03 UTC
This is affecting other non-Eclipse packages too, for example this scratch build of the jutils package fails with the following exception:

http://koji.fedoraproject.org/koji/taskinfo?taskID=5066298


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on project jutils: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test failed: There was an error in the forked process
[ERROR] java.awt.HeadlessException:
[ERROR] No X11 DISPLAY variable was set, but this program performed an operation which requires it.
[ERROR] at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
[ERROR] at java.awt.Window.<init>(Window.java:535)
[ERROR] at java.awt.Frame.<init>(Frame.java:420)
[ERROR] at javax.swing.JFrame.<init>(JFrame.java:218)
[ERROR] at net.java.games.util.plugins.test.PluginTest.<init>(PluginTest.java:97)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
[ERROR] at java.lang.Class.newInstance0(Class.java:374)
[ERROR] at java.lang.Class.newInstance(Class.java:327)
[ERROR] at org.apache.maven.surefire.junit.PojoTestSet.<init>(PojoTestSet.java:63)
[ERROR] at org.apache.maven.surefire.junit.JUnit3Provider.createTestSet(JUnit3Provider.java:118)
[ERROR] at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:108)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:158)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)

Comment 8 Fedora End Of Life 2013-04-03 19:27:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 11 Fedora End Of Life 2015-01-09 22:04:33 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2015-02-18 13:50:41 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.