@@ -4,7 +4,8 @@ import OpenFL.Target;
4
4
5
5
private final CppDemos = [" Mode" , " Flixius" , " MinimalistTD" , " TurnBasedRPG" ];
6
6
7
- function make (target ): Array <NamedExecution > {
7
+ function make (target ): Array <NamedExecution >
8
+ {
8
9
return [
9
10
{
10
11
name : " Running Unit Tests" ,
@@ -35,51 +36,63 @@ function make(target):Array<NamedExecution> {
35
36
];
36
37
}
37
38
38
- private function runUnitTests (target : Target ): ExitCode {
39
+ private function runUnitTests (target : Target ): ExitCode
40
+ {
39
41
runCallbackInDir (" unit" , Haxelib .run .bind ([" munit" , " gen" ]));
40
-
42
+
41
43
// can't run / display results without a browser,
42
44
// this at least checks if the tests compile
43
45
// also, neko fails randomly for some reason... (#2148)
44
- var runTests = target == Cpp || target == Hl ;
45
-
46
- if (runTests ) {
46
+ var runTests = target == Cpp ;
47
+
48
+ if (runTests )
49
+ {
47
50
Sys .println (" Running unit tests...\n " );
48
51
return OpenFL .run (" test" , " unit" , target , " travis" );
49
- } else {
52
+ }
53
+ else
54
+ {
50
55
Sys .println (' Cannot run tests on $target , building instead \n ' );
51
56
Sys .println (" Building unit tests...\n " );
52
57
return OpenFL .build (" unit" , target );
53
58
}
54
59
}
55
60
56
- private function buildCoverageTests (target : Target ): ExitCode {
61
+ private function buildCoverageTests (target : Target ): ExitCode
62
+ {
57
63
Sys .println (" \n Building coverage tests...\n " );
58
64
return runAll ([
59
65
OpenFL .build .bind (" coverage" , target , " coverage1" ),
60
66
OpenFL .build .bind (" coverage" , target , " coverage2" )
61
67
]);
62
68
}
63
69
64
- private function buildDemos (target : Target , ? demos ): ExitCode {
65
- if (demos == null ) {
70
+ private function buildDemos (target : Target , ? demos ): ExitCode
71
+ {
72
+ if (demos == null )
73
+ {
66
74
Sys .println (' \n Building all demos... \n ' );
67
75
demos = [];
68
- } else if (demos == CppDemos ) {
76
+ }
77
+ else if (demos == CppDemos )
78
+ {
69
79
Sys .println (' \n Skipping some demos due to cpp build times \n Building ${demos .length } demo(s)... \n ' );
70
- } else
80
+ }
81
+ else
71
82
Sys .println (' \n Building ${demos .length } demo(s)... \n ' );
72
83
return Flixel .buildProjects (target , demos );
73
84
}
74
85
75
- private function buildSnippetsDemos (target : Target ): ExitCode {
86
+ private function buildSnippetsDemos (target : Target ): ExitCode
87
+ {
76
88
Sys .println (" \n Building spnippets demos...\n " );
77
89
run (" git" , [" clone" , " https://github.com/HaxeFlixel/snippets.haxeflixel.com" ]);
78
-
90
+
79
91
return Flixel .buildProjects (target , [" -dir" , " snippets.haxeflixel.com" ]);
80
92
}
81
93
82
- private function buildSwfVersionTests (target : Target ): ExitCode {
94
+ private function buildSwfVersionTests (target : Target ): ExitCode
95
+ {
83
96
Sys .println (" \n Building swf version tests...\n " );
84
97
return runAll ([
85
98
OpenFL .build .bind (" swfVersion/11" , target ),
0 commit comments