Skip to content

Commit

Permalink
remove hl unit tests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Jun 14, 2024
1 parent 54965f2 commit d83983c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 28 additions & 15 deletions src/Tests.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import OpenFL.Target;

private final CppDemos = ["Mode", "Flixius", "MinimalistTD", "TurnBasedRPG"];

function make(target):Array<NamedExecution> {
function make(target):Array<NamedExecution>
{
return [
{
name: "Running Unit Tests",
Expand Down Expand Up @@ -35,51 +36,63 @@ function make(target):Array<NamedExecution> {
];
}

private function runUnitTests(target:Target):ExitCode {
private function runUnitTests(target:Target):ExitCode
{
runCallbackInDir("unit", Haxelib.run.bind(["munit", "gen"]));

// can't run / display results without a browser,
// this at least checks if the tests compile
// also, neko fails randomly for some reason... (#2148)
var runTests = target == Cpp || target == Hl;

if (runTests) {
var runTests = target == Cpp;

if (runTests)
{
Sys.println("Running unit tests...\n");
return OpenFL.run("test", "unit", target, "travis");
} else {
}
else
{
Sys.println('Cannot run tests on $target, building instead\n');
Sys.println("Building unit tests...\n");
return OpenFL.build("unit", target);
}
}

private function buildCoverageTests(target:Target):ExitCode {
private function buildCoverageTests(target:Target):ExitCode
{
Sys.println("\nBuilding coverage tests...\n");
return runAll([
OpenFL.build.bind("coverage", target, "coverage1"),
OpenFL.build.bind("coverage", target, "coverage2")
]);
}

private function buildDemos(target:Target, ?demos):ExitCode {
if (demos == null) {
private function buildDemos(target:Target, ?demos):ExitCode
{
if (demos == null)
{
Sys.println('\nBuilding all demos...\n');
demos = [];
} else if (demos == CppDemos) {
}
else if (demos == CppDemos)
{
Sys.println('\nSkipping some demos due to cpp build times\nBuilding ${demos.length} demo(s)...\n');
} else
}
else
Sys.println('\nBuilding ${demos.length} demo(s)...\n');
return Flixel.buildProjects(target, demos);
}

private function buildSnippetsDemos(target:Target):ExitCode {
private function buildSnippetsDemos(target:Target):ExitCode
{
Sys.println("\nBuilding spnippets demos...\n");
run("git", ["clone", "https://github.com/HaxeFlixel/snippets.haxeflixel.com"]);

return Flixel.buildProjects(target, ["-dir", "snippets.haxeflixel.com"]);
}

private function buildSwfVersionTests(target:Target):ExitCode {
private function buildSwfVersionTests(target:Target):ExitCode
{
Sys.println("\nBuilding swf version tests...\n");
return runAll([
OpenFL.build.bind("swfVersion/11", target),
Expand Down

0 comments on commit d83983c

Please sign in to comment.