From d57eb023dd16cc6d0386b50ed6555543e7dfe0ef Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Mon, 5 Feb 2024 16:17:57 +0100 Subject: [PATCH] Skip compiling to js for running the tests (making iterations quite a bit faster) --- Makefile | 4 ++-- dune | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b4d09465..8a33a6fa 100644 --- a/Makefile +++ b/Makefile @@ -200,10 +200,10 @@ CLERK=$(CLERK_BIN) --exe $(CATALA_BIN) \ .FORCE: unit-tests: .FORCE - dune runtest + dune build @for-tests @runtest #> tests : Run interpreter tests -tests: .FORCE prepare-install unit-tests +tests: .FORCE unit-tests @$(MAKE) -C tests pass_all_tests tests/%: .FORCE diff --git a/dune b/dune index 415b1bbe..9be60db6 100644 --- a/dune +++ b/dune @@ -52,6 +52,16 @@ (name exec) (deps compiler/catala.exe build_system/clerk.exe)) +;; This alias contains the minimum requirements to run the tests. It's lighter than building @install which includes the (long) compilation of `catala.js` + +(alias + (name for-tests) + (deps + _build/install/default/bin/catala + _build/install/default/bin/clerk + _build/install/default/lib/catala/runtime_ocaml/runtime_ocaml.cmi + _build/install/default/lib/catala/runtime_ocaml/runtime_ocaml__Runtime.cmi)) + ;; This garbles Clerk output, prefer to run from Makefile ;; (rule ;; (alias runtest)