mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Clerk tests: use separate dirs for different flags, to preserve caching
The default output remains at the top of _build if no specific flags have been given, the others are in `_build/test<flags>`
This commit is contained in:
parent
1ea77201ff
commit
b43cc04e16
4
Makefile
4
Makefile
@ -203,12 +203,12 @@ unit-tests: .FORCE
|
||||
dune build @for-tests @runtest
|
||||
|
||||
#> test : Run interpreter tests
|
||||
test: .FORCE
|
||||
test: .FORCE compiler
|
||||
$(CLERK_TEST)
|
||||
|
||||
tests: test
|
||||
|
||||
TEST_FLAGS_LIST = \
|
||||
TEST_FLAGS_LIST = ""\
|
||||
-O \
|
||||
--lcalc \
|
||||
--lcalc,--avoid-exceptions,-O
|
||||
|
@ -868,6 +868,11 @@ let build_statements include_dirs dir =
|
||||
|
||||
let gen_ninja_file catala_exe catala_flags build_dir include_dirs test_flags dir
|
||||
=
|
||||
let build_dir =
|
||||
match test_flags with
|
||||
| [] -> build_dir
|
||||
| flags -> File.((build_dir / "test") ^ String.concat "" flags)
|
||||
in
|
||||
let ( @+ ) = Seq.append in
|
||||
Seq.return
|
||||
(Nj.Comment (Printf.sprintf "File generated by Clerk v.%s\n" version))
|
||||
|
Loading…
Reference in New Issue
Block a user