Merge lp://qastaging/~bregma/unity/use-xorg-gtest into lp://qastaging/unity
Status: | Work in progress |
---|---|
Proposed branch: | lp://qastaging/~bregma/unity/use-xorg-gtest |
Merge into: | lp://qastaging/unity |
Diff against target: |
452 lines (+176/-98) 4 files modified
CMakeLists.txt (+8/-0) debian/control (+67/-69) tests/CMakeLists.txt (+5/-1) tests/test_main.cpp (+96/-28) |
To merge this branch: | bzr merge lp://qastaging/~bregma/unity/use-xorg-gtest |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity Team | Pending | ||
Review via email:
|
Commit message
Use a captive X server (xorg-gtest) to run X-dependent unit tests in a headless environment.
Description of the change
Uses xorg-gtest to spawn a captive X server for unit tests requiring a running X server.
There are two problems still preventing this from being used by default in the merge builds to run an extended set of unit tests.
(1) xorg-gtest defaults to using socket 6133, which would cause spurious failures if multiple builds are runing on the same physical machine: some sort of workaround to choose an available socket can minimize this. For that reason, the test-gtest unit tests suite is still disabled by default in the packaging rules.
(2) Some of the unit tests fail in the build environment for reasons other than an X server not running; these latent failures need to be addressed separately.
Spawning the captive X server can be disabled by using the --no-dummy-xserver command-line option to test-getest for those environments (such as Ubuntu 12.10 or earlier) that do not support LLVMpipe software rendering through Mesa.
Unmerged revisions
- 3091. By Stephen M. Webb
-
added xorg-gtest to UNITY_PLUGIN_DEPS cmake variable
- 3090. By Stephen M. Webb
-
synched with trunk
- 3089. By Stephen M. Webb
-
removed test-gtest from 'make check-headless' once again, until it works
- 3088. By Stephen M. Webb
-
test-gtest: made use of dummy xserver optional
- 3087. By Stephen M. Webb
-
test/test_main.cpp: added copyright text
- 3086. By Stephen M. Webb
-
debian/control: add build depend on libgl1-mesa-dri package for testing
- 3085. By Stephen M. Webb
-
moved entire gtest environment into a gtest environment
- 3084. By Stephen M. Webb
-
added test-gtest to check-headles target
- 3083. By Stephen M. Webb
-
synch with trunk
- 3082. By Stephen M. Webb
-
set xorg-gtest LOGFILE_DIR
168 -Depends: ${shlibs:Depends},
169 - ${misc:Depends},
170 +Depends: ${misc:Depends}, ${shlibs:Depends}
As far I know distro guys preferred to keep these in multiline to avoid conflicts (even if these values shouldn't change for the packages we have).
However the change looks fine, but I've tried running it and... On first try I got a seg fault. nux/unity_ support_ test -p" shows, the problem here is the missing GLX support, and this can be easily been fixed by providing a xorg.conf containing this section:
As "DISPLAY=:133 /usr/lib/
Section "Files" xorg/modules/ extensions" xorg/modules" x86_64- linux-gnu/ xorg/extra- modules" xorg/extra- modules"
ModulePath "/usr/lib/
ModulePath "/usr/lib/
ModulePath "/usr/lib/
ModulePath "/usr/lib/
EndSection
Should we patch libxorg-gtest or can we provide a local config?
Also, when the test crashes, the dummy xorg instance is not stopped correctly of course, and so re-running test-gtest exposes the error: "A server is already running on :133." (why not using a random $DISPLAY?).
This is something that using a script to trigger Xorg would have been avoided.