Skip compiling to js for running the tests

(making iterations quite a bit faster)
This commit is contained in:
Louis Gesbert 2024-02-05 16:17:57 +01:00
parent 7f5b56e8f2
commit d57eb023dd
2 changed files with 12 additions and 2 deletions

View File

@ -200,10 +200,10 @@ CLERK=$(CLERK_BIN) --exe $(CATALA_BIN) \
.FORCE: .FORCE:
unit-tests: .FORCE unit-tests: .FORCE
dune runtest dune build @for-tests @runtest
#> tests : Run interpreter tests #> tests : Run interpreter tests
tests: .FORCE prepare-install unit-tests tests: .FORCE unit-tests
@$(MAKE) -C tests pass_all_tests @$(MAKE) -C tests pass_all_tests
tests/%: .FORCE tests/%: .FORCE

10
dune
View File

@ -52,6 +52,16 @@
(name exec) (name exec)
(deps compiler/catala.exe build_system/clerk.exe)) (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 ;; This garbles Clerk output, prefer to run from Makefile
;; (rule ;; (rule
;; (alias runtest) ;; (alias runtest)