From 584ba7dfbca6bb8b8d96ea3f72589e1c700b81f7 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Wed, 14 Feb 2024 12:06:43 +0100 Subject: [PATCH] Some fixes to 'make alltest' --- Makefile | 26 ++++++++++++++++---------- dune | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index e391a59f..b1ba117e 100644 --- a/Makefile +++ b/Makefile @@ -238,27 +238,33 @@ all: \ runtimes \ plugins +BRANCH=$(shell git branch --show-current 2>/dev/null || echo master) + #> alltest : Runs more extensive tests, including the examples and french-law. Use before push! -alltest: +alltest: dependencies-python @export DUNE_PROFILE=check && \ - dune build @for-tests @install @runtest && \ + dune build @update-parser-messages @install @runtest && \ $(CLERK_BIN) test tests && \ - rm -rf _catala-examples _french-law && \ - trap "rm -rf _catala-examples _french-law $$TMP" EXIT && \ + rm -rf catala-examples.tmp french-law.tmp && \ + trap "rm -rf catala-examples.tmp french-law.tmp $$TMP" EXIT && \ { git clone https://github.com/CatalaLang/catala-examples \ --depth 1 --reference-if-able ../catala-examples \ - _catala-examples -b $$(git branch --show-current) || \ + catala-examples.tmp -b $(BRANCH) || \ git clone https://github.com/CatalaLang/catala-examples \ --depth 1 --reference-if-able ../catala-examples \ - _catala-examples; } && \ - $(CLERK_BIN) test _catala-examples; \ + catala-examples.tmp || \ + git clone -s ../catala-examples catala-examples.tmp $(BRANCH) || \ + git clone -s ../catala-examples catala-examples.tmp master; } && \ + $(CLERK_BIN) test catala-examples.tmp && \ { git clone https://github.com/CatalaLang/french-law \ --depth 1 --reference-if-able ../french-law \ - _french-law -b $$(git branch --show-current) || \ + french-law.tmp -b $(BRANCH) || \ git clone https://github.com/CatalaLang/french-law \ --depth 1 --reference-if-able ../french-law \ - _french-law; } && \ - make -C _french-law all PY_VENV_DIR=$(CURDIR)/_python_venv + french-law.tmp || \ + git clone -s ../french-law french-law.tmp $(BRANCH) || \ + git clone -s ../french-law french-law.tmp master; } && \ + make -C french-law.tmp all PY_VENV_DIR=$(ROOT_DIR)/_python_venv #> clean : Clean build artifacts clean: diff --git a/dune b/dune index fbba4ee9..e6e33c64 100644 --- a/dune +++ b/dune @@ -2,7 +2,7 @@ (data_only_dirs tests syntax_highlighting) -(vendored_dirs _catala-examples _french-law) +(vendored_dirs catala-examples.tmp french-law.tmp) (copy_files (alias doc)