From 3828850dd623a515219118800b6e70b737788670 Mon Sep 17 00:00:00 2001 From: Albin Chaboissier Date: Fri, 7 Nov 2025 12:11:29 +0100 Subject: [PATCH] Use nproc for parallel testing --- Makefile | 2 +- build.sc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6569419..80fe676 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ mill: autotest: mill test-bench/mem/tests/$(PROG).mem ##! Lance la simulation automatique pour tous les tests ou juste celui fourni dans PROG testall: mill compile - @PROOT=$(PWD) ./mill TPchisel.test.testOnly $(TOP_REP).ZzTopAllSpec + @PROOT=$(PWD) NPROC=$(shell nproc) ./mill TPchisel.test.testOnly $(TOP_REP).ZzTopAllSpec simulation: compile ##! Lance gtkwave sur le test fourni dans PROG @$(call check_vars,PROG) diff --git a/build.sc b/build.sc index 38b5000..3093bbb 100644 --- a/build.sc +++ b/build.sc @@ -38,10 +38,11 @@ object `TPchisel` extends SbtModule { m => ivy"org.scalatest::scalatest::3.2.19" ) + val nproc = sys.env.get("NPROC").getOrElse("1"); override def forkArgs = super.forkArgs() ++ Seq( "-Dscalatest.parallel.enabled=true", "-Dscalatest.parallel.mode=concurrent", - "-Dscalatest.parallel.config.fixed.pool.size=12" + s"-Dscalatest.parallel.config.fixed.pool.size=$nproc" ) } }