Created
October 27, 2014 12:32
-
-
Save AxGord/e8ffb65be0e4af5efa89 to your computer and use it in GitHub Desktop.
Appveyor munit helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import sys.io.File; | |
/** | |
* Appveyor munit helper | |
* @author AxGord | |
*/ | |
class Main { | |
static function main() { | |
var inp = Sys.stdin(); | |
var f = inp.readAll().toString(); | |
Sys.println(f); | |
var a = f.split('Class: '); | |
a.shift(); | |
a = [for (e in a) e.split('\r').shift()]; | |
var result:Int = 0; | |
for (e in a) { | |
var s = e.split(' '); | |
var n = s[0]; | |
var b = s[1].indexOf('!') == -1 && s[1].indexOf('x') == -1; | |
if (!b) result = 1; | |
Sys.command('appveyor', ['AddTest', n, '-Framework', 'munit', '-FileName', n, "-Outcome", b ? "Passed" : "Failed"]); | |
} | |
trace('Result: '+(result == 0 ? "Passed" : "Failed")); | |
Sys.exit(result); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
haxelib run munit test -neko | neko Appveyor.n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using example: https://github.com/AxGord/Pony