massive-oss / MassiveUnit

munit is a cross-platform unit testing framework for Haxe. Utilises metadata markup for test cases and includes tools for generating, compiling and running test cases from the command line.
Other
181 stars 56 forks source link

Issues building project from source #182

Open CrazyFlasher opened 4 years ago

CrazyFlasher commented 4 years ago
C:\Users\GANAPATI\projects\MassiveUnit>haxe build.hxml
build MUnit
compile tool
set dev directory for testing
Development directory set to C:\Users\GANAPATI\projects\MassiveUnit\src
run tool tests
Error: Error parsing haxelib.json for munit@dev: [file_contents,C:\Users\GANAPATI\projects\MassiveUnit\src/haxelib.json]

Called from haxelib/client/Main.hx line 1631
Called from haxelib/client/Main.hx line 1614
Called from haxelib/client/Main.hx line 493
c:\HaxeToolkit\haxe\lib\mlib/2,0,3/massive/sys/haxe/HaxeWrapper.hx:104: characters 30-36 : Warning : Usage of this typedef is deprecated
c:\HaxeToolkit\haxe\lib\mlib/2,0,3/massive/sys/haxe/HaxeWrapper.hx:112: characters 15-21 : Warning : Usage of this typedef is deprecated
Error: Command failed with error 1

Ok, I changed -cmd haxelib dev munit ./src to -cmd haxelib dev munit:

C:\Users\GANAPATI\projects\MassiveUnit>haxe build.hxml
build MUnit
compile tool
set dev directory for testing
Development directory disabled
run tool tests
Massive Unit - Copyright 2019 Massive Interactive. Version 2.3.4
   haxe -main TestMain -cp test -cp src -cp ../src -lib mlib -neko ../bin/test/tool/munit_tool_test.n -lib mcover -D MCOVER --macro mcover.MCover.coverage([''],['
src'],[''])
   c:\HaxeToolkit\haxe\lib\mlib/2,0,3/massive/sys/haxe/HaxeWrapper.hx:104: characters 30-36 : Warning : Usage of this typedef is deprecated
c:\HaxeToolkit\haxe\lib\mlib/2,0,3/massive/sys/haxe/HaxeWrapper.hx:112: characters 15-21 : Warning : Usage of this typedef is deprecated

MUnit Results
------------------------------
Class: massive.munit.ConfigTest ........ [53.37%]

------------------------------
COVERAGE REPORT
------------------------------

OVERALL COVERAGE STATS:

    packages    20%        1 / 5
    files       6.25%      1 / 16
    classes     6.25%      1 / 16
    methods     8.76%      12 / 137
    statements  5.54%      22 / 397
    branches    5.13%      20 / 390
    lines       5.39%      103 / 1910

COVERAGE RESULT     6.62%
==============================
PASSED
Tests: 8  Passed: 8  Failed: 0 Errors: 0 Ignored: 0 Time: 0.07

Tests PASSED under neko using summary client
------------------------------
PLATFORMS TESTED: 1, PASSED: 1, FAILED: 0, ERRORS: 0, TIME: 1.702
run core tests
Massive Unit - Copyright 2019 Massive Interactive. Version 2.3.4
   haxe -main TestMain -cp test -cp src -lib mlib -neko bin/test/core/neko_test.n
   haxe -main TestMain -cp test -cp src -lib mlib -cpp bin/test/core/cpp_test
      haxelib run hxcpp Build.xml haxe -Dhaxe="4.0.0-rc.5" -Dhaxe3="1" -Dhaxe4="1" -Dhaxe_ver="4.000" -Dhxcpp_api_level="400" -Dhxcpp_smart_strings="1" -Dmlib="2.
0.3" -Dsource-header="Generated by Haxe 4.0.0-rc.5+4a745347f" -Dstatic="1" -Dtarget.name="cpp" -Dtarget.static="true" -Dtarget.sys="true" -Dtarget.threaded="true"
 -Dtarget.unicode="true" -Dtarget.utf16="true" -Dutf16="1" -I"c:\\HaxeToolkit\\haxe\\lib\\mlib/2,0,3/" -I"src/" -I"test/" -I"" -I"C:\\HaxeToolkit\\haxe\\extraLibs
/" -I"C:\\HaxeToolkit\\haxe\\std/cpp/_std/" -I"C:\\HaxeToolkit\\haxe\\std/"
      C:\Users\GANAPATI\projects\MassiveUnit\bin\test\core\cpp_test>setlocal enabledelayedexpansion
      Warning: Could not find environment variables for Visual Studio
      Missing HXCPP_VARS
   Error: Could not automatically setup MSVC
Error: Build failed
Error: Error compiling hxml for cpp
Target cpp C:\Users\GANAPATI\projects\MassiveUnit\bin\test\core\cpp_test\
c:\HaxeToolkit\haxe\lib\mlib/2,0,3/massive/sys/haxe/HaxeWrapper.hx:104: characters 30-36 : Warning : Usage of this typedef is deprecated
c:\HaxeToolkit\haxe\lib\mlib/2,0,3/massive/sys/haxe/HaxeWrapper.hx:112: characters 15-21 : Warning : Usage of this typedef is deprecated
Error: Command failed with error 1

C:\Users\GANAPATI\projects\MassiveUnit>

Seems to be OK (ignoring core tests results) Then I go to my project:

C:\Users\GANAPATI\projects\casinohx>haxelib dev munit C:\Users\GANAPATI\projects\MassiveUnit
Development directory set to C:\Users\GANAPATI\projects\MassiveUnit

C:\Users\GANAPATI\projects\casinohx>haxelib run munit test ./scripts/test.hxml
Massive Unit - Copyright 2019 Massive Interactive. Version MassiveUnit
   haxe -main TestMain -lib munit -lib hamcrest -lib dox -lib openfl -lib DomWires -lib actuate -lib openfl-spine -lib spine-hx -lib lime -lib spritesheet -lib feathersui -D RENDER_TILE -cp src -cp test --remap flash:openfl -js build/js_test.js
------------------------------
ERROR: Local results server appeared to hang so test reporting was cancelled.

And browser opens with this broken page: image

elsassph commented 4 years ago

Here's what work for me, but only with Haxe 3.4.7:

cd tool
haxe build.hxml
haxelib dev munit ../src
haxelib run munit test

The tool doesn't work with Haxe 4 atm.

elsassph commented 4 years ago

Here's what work for me, but only with Haxe 3.4.7:

cd tool
haxe build.hxml
haxelib dev munit ../src
haxelib run munit test

The tool doesn't work with Haxe 4 atm.

Also I tend to avoid running the C++ tests, because I'm a wimp :D