Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running tests stuck with -coverage flag with flixel #32

Open
fulara opened this issue Jan 11, 2015 · 4 comments
Open

Running tests stuck with -coverage flag with flixel #32

fulara opened this issue Jan 11, 2015 · 4 comments

Comments

@fulara
Copy link

fulara commented Jan 11, 2015

After adding the -coverage flag to test command the execution stops.
Browser does not get opened and nothing gets logged.

Issue can be reproduced with default flixel template and no added code.

Is there any workaround for this?

@IBwWG
Copy link

IBwWG commented Feb 15, 2016

Hi, I'm pretty new here. Are you still getting this behaviour?

I tried it just now with the latest munit/mcover and the dev branch of haxeflixel and got different results.

I'm wondering what exact steps you did. Me, I ran these commands:

flixel tpl -n coveragetest
cd coveragetest
haxelib run munit config

...and put in "source" and "assets" for target class paths and resources dir, respectively. All others default. Then, I chopped test.hxml to only contain Flash 9+ and CPP, then added a line pasted from the readme (with the space that was making it choke) and a -lib flixel to each:

## Flash 9+
-main TestMain
-lib munit
-lib hamcrest
-lib flixel
-cp source

-cp test
-swf-version 11
-swf build/as3_test.swf

--macro mcover.MCover.coverage([''], ['source'])

--next

## CPP
-main TestMain
-lib munit
-lib hamcrest
-lib flixel
-cp source

-cp test
#-D HXCPP_M64
-cpp build/cpp_test

--macro mcover.MCover.coverage([''], ['source'])

I notice that your --macro line has a second ['']...why is that? (I tried it both with and without a second [''] but it didn't seem to make a difference to the error messages I would get.) Update: I see it's the classes to ignore--I hadn't made it that far in the docs because I was just going by 'usage example'...but that doesn't tell the whole story.

I'm getting some strange issue with backslashes like one I talked about here:

HaxeWrapper.hx:73: --macro:1: character 0 : Could not parse `mcover.MCover.coverage([''],\ ['source'])`
HaxeWrapper.hx:73: --macro:1: character 0 : Invalid character '\'
Error: Error compiling hxml for as3

If I take out the space between [''], and ['source'], I instead get something I've gotten before:

HaxeWrapper.hx:73: C:\HaxeToolkit\haxe\lib\openfl/3,6,0/openfl/display/IBitmapDrawable.hx:17: characters 8-66 : Type not found : RenderSession
Error: Error compiling hxml for as3

If I take out my added -lib flixel lines, I get:

HaxeWrapper.hx:73: source/AssetPaths.hx:3: characters 2-7 : Type not found : flixel.system.FlxAssets
Error: Error compiling hxml for as3

If I comment out all of the lines of AssetPaths.hx, I get:

HaxeWrapper.hx:73: source/Main.hx:8: characters 7-21 : Type not found : flixel.FlxGame
Error: Error compiling hxml for as3

This is maybe the only error I would have expected, since now -lib flixel is missing.

Is that what you get nowadays or the same issue as it was before?

@fulara
Copy link
Author

fulara commented Feb 15, 2016

Hello!

I've moved away from haxel so I dont even have a working environment to reproduce this.

Sorry I cant help you :(

@IBwWG
Copy link

IBwWG commented Feb 15, 2016

No worries...I appreciate the quick response! :)

@IBwWG
Copy link

IBwWG commented Feb 15, 2016

I was able to get it working with the following text.hxml file (although, cpp is commented out because I get errors trying that):

## All targets

-main TestMain
-lib munit
-lib hamcrest
-cp C:/HaxeToolkit/haxe/lib/flixel/git
-D flixel=3.3.12
-cp C:/HaxeToolkit/haxe/lib/openfl/3,6,0
-D openfl=3.6.0
-cp C:/HaxeToolkit/haxe/lib/lime/2,9,0
-D lime=2.9.0
-cp C:/HaxeToolkit/haxe/lib/hscript/2,0,5
-D hscript=2.0.5
-cp C:\HaxeToolkit\haxe\lib\openfl/3,6,0/extern
-cp source
-D native-trace
-cp test
-D openfl-next
-D tools=2.9.0
-D flash-use-stage
-D no-compilation
-D openfl-flash
-D fdb
-D web
-cp export/flash/haxe
--macro flixel.system.macros.FlxDefines.run()
-lib mcover
--macro mcover.MCover.coverage([''],['source'])

--each

## Flash 9+

-swf-version 11.8
-swf export/test/coveragetest.swf

#--next

## CPP

#-D HXCPP_M64
#-cpp export/cpp_test

Note if you're copying the above: it's using the latest dev branch of haxeflixel, and apparently openfl-next, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants