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

Re: [MirageOS-devel] topkg'ing ocaml-crunch


  • To: Federico Gimenez <federico.gimenez@xxxxxxxxx>
  • From: Anil Madhavapeddy <anil@xxxxxxxxxx>
  • Date: Thu, 3 Nov 2016 10:03:11 +0000
  • Cc: mirageos-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 03 Nov 2016 10:03:14 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=recoil.org; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= selector1; b=nW1brE/hZgixqwz5w+LXBWCQcqCR7zYYpkfud6Svssg0cqfnMjc SA0z+XjwpflAx7Yl34iPKakKxpI/Fx+B4qLDKmllfWkuu46ld6KajS3g2XSGvNCv g5RWAHTdq78y3cWV3GS57bvRUhDSNbKIaP8mgy98oFYgf1USVQN1czM0=
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>

On 3 Nov 2016, at 09:37, Federico Gimenez <federico.gimenez@xxxxxxxxx> wrote:
> 
> Hello everyone, I've started porting ocaml-crunch to topkg, have this so far 
> [1].

That's looking simpler!

> I have a problem with the tests, not sure what's the best approach to port 
> them given that now they are based on make and are testing the binary product 
> of the build process. Moreover, when i try to execute them with the oasis 
> based layout i get an error [2], maybe i'm doing something wrong.

The existing tests aren't too OPAM-friendly either, since they are not present 
in a `build-test` field (so the extra dependencies needed are not auto 
installable).

> So, i have a couple of questions:
> 
> * Are the tests for ocaml-crunch currently working? If so, how can i execute 
> them? what's the best approach for porting them to topkg?

The trunk version of ocaml-crunch has had the interface changes from the main 
mirage trunk applied, so you will need to `opam remote add dev 
https://github.com/mirage/mirage-dev.git` to get the development version of all 
the right packages.

After that, you will need to add `mirage-types-lwt {test}` as a test dependency 
so that the right libraries are available in the opam file.  Once you have 
that, the tests should work.

> * If they are not working, how should i write a new test for the package? 
> what should i test in this concrete case and from which perspective (binary 
> consumer vs library consumer)?


The tests seem very basic at the moment, so writing a topkg + bos test that 
writes the .ml files into _build/_tests, invokes the compiler on it, and 
verifies that the resulting compiled ML outputs the crunched contents would be 
useful.

This is a very non-traditional test as it involves calling the compiler 
multiple times, so it's probably the most complicated part of the topkg port!

regards,
Anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

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