caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: John Christopher McAlpine <jmcalpin@nmt.edu>,
	caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Use of unit testing frameworks in OCaml
Date: Wed, 9 Sep 2015 23:29:27 +0200	[thread overview]
Message-ID: <CAPFanBG=FDN-7Mm+Or6sdxWFpem4MWK-gy8C7BEQDu7g0QYAHw@mail.gmail.com> (raw)
In-Reply-To: <55F09806.1030507@nmt.edu>

Could you be more specific in what kind of benefits you expect such a
migration would bring? I'm possibly not familiar enough with these
frameworks, but it is rather unclear to me what "significant
improvement to the maintenability" we should expect.

Note that many tests in the compiler testsuite are in fact rather
integration tests than unit tests: they test a complete run of the
compiler (or toplevel) on an input program, rather that a single
function of the compiler codebase.

If I had time to devote to improve the compiler testsuite, here are
the two changes I would be interested in implementing (or getting
implemented for me):
- A way to collect coverage checking information (which parts of the
compiler codebase are exercized by the tests?). I started working on
it once by just adding Bisect somewhere in the compiler build system,
but lost motivation before getting into a a work-out-of-the-box state
(it generated many independent coverage files, one for each test, that
would have to be aggregated). I think that should not be too hard.
- A separation between the tests that are expected to be long-running
and the others. Currently running the testsuite takes a few minutes on
my machine. If I could get a subset of the tests that has the same
coverage for changes that do not affect the code generation backend
running in under one minute, that would improve the hack-build-test
feedback loops.
- A way to run in parallel the tests that are not sensitive to
parallel execution (those that do not test performances or thread
scheduling).

All of these might be easier with a more elegant/declarative/structure
test framework, but it is not immediately obvious to me that switching
to oUnit would do the job.

On Wed, Sep 9, 2015 at 10:35 PM, John Christopher McAlpine
<jmcalpin@nmt.edu> wrote:
> From what I can tell, the tests for the OCaml compiler and standard
> libraries are all done with a fairly small framework designed specifically
> for testing the compiler and standard libraries. Is there any particular
> reason not to use a tool such as OUnit or Broken for these tests? I am aware
> that adding dependencies to the compiler is generally frowned upon, but
> these libraries could significantly improve the maintainability of the core
> language and libraries.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  parent reply	other threads:[~2015-09-09 21:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 20:35 John Christopher McAlpine
2015-09-09 20:55 ` Sébastien Hinderer
2015-09-09 22:29   ` John Christopher McAlpine
2015-09-09 23:32     ` Daniel Bünzli
2015-09-09 23:36       ` Raoul Duke
2015-09-09 23:53   ` Hendrik Boom
2015-09-09 21:29 ` Gabriel Scherer [this message]
2015-09-10  9:22   ` Alan Schmitt
2015-09-09 23:18 ` Gerd Stolpmann
2015-09-10 10:09 ` Fabrice Le Fessant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPFanBG=FDN-7Mm+Or6sdxWFpem4MWK-gy8C7BEQDu7g0QYAHw@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jmcalpin@nmt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).