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

Re: [MirageOS-devel] Mirage questions from writing a REST service

On 9 Jul 2014, at 17:27, Dave Scott <Dave.Scott@xxxxxxxxxx> wrote:

> On 9 Jul 2014, at 16:21, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>> On 8 July 2014 23:46, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>>> On 7 Jul 2014, at 10:08, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>>>> I'm writing a test Mirage service for queuing files. It's not using
>>>> ThomasG's merge-queues - I'm just trying the low-level FS stuff first.
>>>> Some problems I found:
>> [...]
>>>> 4. Can I get mirage to generate a Makefile that builds and runs my
>>>> unit-tests? I guess I can't run the unit-tests when in --xen mode,
>>>> because some modules have conflicting names, but it would be nice in
>>>> --unix mode at least.
>>> Need some more details on the nature of these unit tests, as I don't
>>> understand what you mean by 'conflicting names'.  Can each unit test
>>> be compiled as a separate unikernel (so it'll work on Xen) via some
>>> config.ml code?
>> I hadn't thought of running the tests on Xen, though that does make sense.
>> I'd need some way for OUnit to run tests that return a unit Lwt.t.
> In OUnit test cases I normally use ‘Lwt_main.run’ to convert ‘unit Lwt.t’ 
> into ‘unit’.

But it's a little tricker in Mirage since we don't have that run function
until the Job functor is applied.

It's probably easier to modify oUnit to pass in a run function  that
parameterises tests; it's a very simple library.  We need to get rid
of the Unix-specific bits anyway (unless it uses channels for everything).

MirageOS-devel mailing list



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