eliasku / hxmake Goto Github PK
View Code? Open in Web Editor NEWBuild automation for Haxe
Build automation for Haxe
There is need for create a test plugin which create test tasks on configuration step based on provided module configurations.
something like:
...
testConfiguration(function(config:TestConfigurationExt) {
config.targets = [Target.Flash, Target.Js, Target.NodeJs];
config.defines = ["my_supper_define"];
config.perTargetTestConfiguration(Target.Js, function(targetConfig:PerTargetTestConfiguration) {
targetConfig.defines = ["html5"];
});
})
...
Environment variables HOMEDRIVE
, HOMEPATH
is absent on my system.
Windows 10 (10.0)
Required for TestTask (target=swf).
I have a very simple hxmake module.
hxmake idea
generate proper Intellij idea project but doesn't launch project. Just opens Intellij IDEA instance.
Example of module:
package;
import hxmake.haxelib.HaxelibExt;
import hxmake.haxelib.HaxelibPlugin;
import hxmake.idea.IdeaPlugin;
import hxmake.Module;
using hxmake.haxelib.HaxelibPlugin;
class SimpleModule extends Module {
function new() {
config.classPath = ["src/main/haxe"];
config.testPath = ["src/test/haxe"];
apply(HaxelibPlugin);
apply(IdeaPlugin);
library(function(ext:HaxelibExt) {
ext.config.description = "Description";
ext.config.contributors = ["Roman Mikhailov"];
ext.config.license = "MIT";
ext.config.version = "0.0.1";
ext.config.releasenote = "No releases";
ext.config.tags = ["tag, tag1"];
ext.pack.includes = ["src/main/haxe", "haxelib.json"];
});
}
}
Looks like phantomjs doesn't closing after test execution on macOS.
Minimal example:
https://github.com/romanmikhailov/hxmake_test_js_bug_example
Gist:
https://gist.github.com/romanmikhailov/6a53800511e329cc58eff0b8be7a892e
This results that previous test result or result from other test will be output:
hxmake_jstest_bug mikhailovr$ hxmake test1
/usr/local/lib/haxe/lib/hxmake/0,2,1/src/hxmake/utils/Haxe.hx:41: characters 31-49 : Warning : Use programPath instead
Tasks order:
test1 for hxmake_jstest_bug
2.1.1
PrintReport.hx:52:
assertations: 1
successes: 1
errors: 0
failures: 0
warnings: 0
execution time: 0.003
results: ALL TESTS OK (success: true)
TestCase1
test1pass: OK .
Make time: 4.56 sec.
hxmake_jstest_bug mikhailovr$
hxmake_jstest_bug mikhailovr$ hxmake test2
/usr/local/lib/haxe/lib/hxmake/0,2,1/src/hxmake/utils/Haxe.hx:41: characters 31-49 : Warning : Use programPath instead
Tasks order:
test2 for hxmake_jstest_bug
2.1.1
PrintReport.hx:52:
assertations: 1
successes: 1
errors: 0
failures: 0
warnings: 0
execution time: 0.003
results: ALL TESTS OK (success: true)
TestCase1
test1pass: OK .
Make time: 4.56 sec.
hxmake_jstest_bug mikhailovr$
but correct output of test2 is:
hxmake_jstest_bug mikhailovr$ hxmake test2
/usr/local/lib/haxe/lib/hxmake/0,2,1/src/hxmake/utils/Haxe.hx:41: characters 31-49 : Warning : Use programPath instead
Tasks order:
test2 for hxmake_jstest_bug
2.1.1
PrintReport.hx:52:
assertations: 1
successes: 1
errors: 0
failures: 0
warnings: 0
execution time: 0.003
results: ALL TESTS OK (success: true)
TestCase2
test2pass: OK .
Make time: 4.96 sec.
hxmake_jstest_bug mikhailovr$
Add Daemon-mode with Haxe compiler server (for recompiling make scripts faster)
Content of make/EnabledTestModule.hx
:
package;
import hxmake.cli.MakeLog;
import hxmake.Task;
class EnabledTestModule extends hxmake.Module {
public function new() {
task("task1", Task.empty().doLast(function(_):Void { MakeLog.warning("task1"); }));
task("task1").enabled = false;
}
}
Run of:
hxmake task1
Produces:
$ hxmake task1
/usr/local/lib/haxe/lib/hxmake/0,2,1/src/hxmake/utils/Haxe.hx:41: characters 31-49 : Warning : Use programPath instead
Tasks order:
task1 for hxmake_task_enabled
[WARNING] task1
Make time: 0 sec.
Create examples repository to demonstrate current capabilities. Add examples running to hxmake continues-integration process.
Please, add default class path for tests.
TestTask.hx
classPath:Array = ["test"];
Now HTTP server for JS target always runs on localhost:2000.
I think there should be ability to modify port.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.