From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: [PATCH 24/96] gnu: Add ocaml-alcotest Date: Tue, 3 Jan 2017 20:11:05 +0100 Message-ID: <20170103191217.6431-25-julien@lepiller.eu> References: <20170103191217.6431-1-julien@lepiller.eu> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOUWx-0008OM-G0 for guix-devel@gnu.org; Tue, 03 Jan 2017 14:13:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOUWw-00051Q-J6 for guix-devel@gnu.org; Tue, 03 Jan 2017 14:13:55 -0500 Received: from dau94-h03-89-91-205-84.dsl.sta.abo.bbox.fr ([89.91.205.84]:35322 helo=skaro.lepiller.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOUWw-00050k-9S for guix-devel@gnu.org; Tue, 03 Jan 2017 14:13:54 -0500 Received: from localhost (localhost [127.0.0.1]) by skaro.lepiller.eu (Postfix) with ESMTP id CA01881597 for ; Tue, 3 Jan 2017 20:13:51 +0100 (CET) Received: from skaro.lepiller.eu ([127.0.0.1]) by localhost (lepiller.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g0hLkyqH_i3D for ; Tue, 3 Jan 2017 20:13:46 +0100 (CET) Received: from localhost.localdomain (128-79-116-134.hfc.dyn.abo.bbox.fr [128.79.116.134]) by skaro.lepiller.eu (Postfix) with ESMTPSA id 4703381265 for ; Tue, 3 Jan 2017 20:12:48 +0100 (CET) In-Reply-To: <20170103191217.6431-1-julien@lepiller.eu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/ocaml.scm (ocaml-alcotest): New variable. --- gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bf308f1a7..93092cfb1 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -1207,3 +1207,34 @@ removes deprecated and rarely used functions, alters some signatures and names, adds a few missing functions and fully exploits OCaml's newfound string immutability.") (license license:isc))) + +(define-public ocaml-alcotest + (package + (name "ocaml-alcotest") + (version "0.7.2") + (home-page "https://github.com/mirage/alcotest/") + (source (origin + (method url-fetch) + (uri (string-append home-page "releases/download/" version + "/alcotest-" version ".tbz")) + (sha256 + (base32 + "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc")))) + (build-system ocaml-build-system) + (arguments `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs `(("opam" ,opam) + ("topkg" ,ocaml-topkg))) + (propagated-inputs `(("fmt" ,ocaml-fmt) + ("astring" ,ocaml-astring))) + (synopsis "Lightweight OCaml test framework") + (description "Alcotest exposes simple interface to perform unit tests. It +exposes a simple TESTABLE module type, a check function to assert test +predicates and a run function to perform a list of unit -> unit test callbacks. +Alcotest provides a quiet and colorful output where only faulty runs are fully +displayed at the end of the run (with the full logs ready to inspect), with a +simple (yet expressive) query language to select the tests to run.") + (license license:isc))) -- 2.11.0