Closed SingingBush closed 9 years ago
Do you have some code i could try? I'm currently not running into any problems running unittests.
The code that I'm working on is dfract. When I run dub test
on my machine (Fedora 22) it runs fine, it's just on travis (Ubuntu 12.04 LTS) that I get the problem.
The problem is that the D runtime runs the unittests before calling main, while the GTK/GObject runtime is initialized there. This means that when running unittests on code using GtkD you are calling GTK/GObject functions without initializing there runtime. Now with newer versions of GObject >= 2.36 the type system is initialized automatically, and the error above isn't triggered, although other errors might occur when testing different parts of GtkD/GTK.
For this error you could try calling gobject.Type.Type.init()
at the start of the unittest.
thanks for the info. after some communication with the guys at travis-ci I've got my build working again. They've finally got Ubuntu 14.04 build agents (as well as mac osx) so the available dependencies are a lot more up to date.
in case you're interested, the following travis.yml
is what I am now using:
language: d
sudo: required
services:
- docker
before_install:
- "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then sudo apt-get update -qq; fi"
- "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then sudo apt-get install -y libcairo2-dev libgdk-pixbuf2.0-dev libgtk-3-0; fi"
- "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then brew update; fi"
- "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then brew install glib cairo pango gtk+3; fi"
d:
- dmd
# - gdc
- ldc
os:
- linux
- osx
matrix:
allow_failures:
- os: osx
I am working on an app that depends on
gtk-d 3.1.4
and uses dunit for testing. When runningdub test
on travis-ci.org I'm getting the following errors in the logs: