Search code examples
travis-cihaxemunit

Haxe munit with Travis


I'm trying to setup Travis to run munit tests for a Haxe library. It installs the dependencies but fails when it tries to run the first test. Any suggestions would be appreciated.

Massive Unit - Copyright 2015 Massive Interactive. Version 2.1.0
   haxe -main TestMain -lib munit -lib hamcrest -cp quick-haxe quick-haxe -cp test -swf-version 11 -swf build/as3_test.swf
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://localhost:2000/tmp/runner/index.html'
Error: Error running http://localhost:2000/tmp/runner/index.html

Repo here: https://github.com/ramchale/quick-haxe

Travis report here: https://travis-ci.org/ramchale/quick-haxe


Solution

  • The munit test runner is trying to run your tests in a browser, which it launches by calling the open tool on unix systems. Travis supports headless browsers but munit does not (AFAIK).

    You should be able to run the system tests (hxcpp, neko) fine, and for a utility library it will give you some degree of "things are working" confidence.

    The Haxe compiler runs JS/Flash tests through SauceLabs, but not using munit.