[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New build system



I've just pushed a number of changes to the way Mirage is built to my tree, as 
well as merged Mort/Haris' Openflow branches and David's Xen changes.

The most visible user-change is that you now build your domains via a single 
command "mir-build":

$ mir-build unix-direct/foo.bin # unix
$ mir-build xen/foo.xen         # xen kernel
$ mir-build node/foo.js         # node.js

Will build the relevant targets. There is also the start of a test harness that 
can automatically build and test domains across all the backends, using the 
'mir-run' command. You can try this by:

$ cd regress
$ ocamlbuild -j 5 suite.run # run 5 parallel tests
$ cat _build/suite.run # show log of all the results

The suite file also contains the list of tests, and an individual test can be 
run by:

$ ocamlbuild lwt/heads2.exec
$ cat _build/lwt/heads2.exec # show the log of this test
$ ocamlbuild lwt/heads2.xen.exec # run just the xen version of this test

Another improvement is that you no longer need to specify a .mir file at all, 
as it is automatically inferred.  The hello world is now smaller. If you have 
hello.ml:

let main () =
  OS.Console.Log "hello!";
  Lwt.return ()

You can build it via 'mir-build unix-socket/hello.bin'

Note that you no longer need the "let _ = OS.Main.run (main())", as this is 
automatically inserted by the build system. You simply need a function called 
'main' in the file. If you're entry point is another function, just specify it 
in a .mir file (e.g. "Hello.mymain").

This set of changes simplifies things considerably behind the scenes, and lets 
us have a really nice test harness that can even do performance testing quite 
easily.

There's another set of changes coming up very soon that adds support for 
first-class modules in the device system, and will make it very easy to 
virtualise Mirage instances (for example, to simulate large scale networks).  
More on that later this week... I'll also upgrade the docs on the website.

Meanwhile, if anyone feels the urge to add more tests into regress/, please 
feel free to start sticking small unit tests in there :-)

Anil


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.