Skip to content

Instantly share code, notes, and snippets.

@AxGord
Created October 27, 2014 12:32
Show Gist options
  • Save AxGord/e8ffb65be0e4af5efa89 to your computer and use it in GitHub Desktop.
Save AxGord/e8ffb65be0e4af5efa89 to your computer and use it in GitHub Desktop.
Appveyor munit helper
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);
}
}
haxelib run munit test -neko | neko Appveyor.n
@AxGord
Copy link
Author

AxGord commented Oct 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment