diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 288e2d83d369f35de22dc36775302d41b91caa3b..9bb89c32bb07a2959fd3c185db49ebcc089265b5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ variables:
   OLD_MATLAB_VERSION: R2014a
 
 before_script:
-  - git clone https://git.dynare.org/Dynare/m-unit-tests
+  - git clone https://git.dynare.org/Dynare/m-unit-tests && cd m-unit-tests && git checkout 343d9e13654a07c348fad863f7f79a03896c6bc9
 
 test_matlab:
   stage: test
diff --git a/Makefile b/Makefile
index cafff1dc8cdda278080971bf2b5d5eca85a8de0f..4580b0a9463992dbc1d4eddac3340f51341a5a05 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ MATLAB ?= matlab
 all: check-octave check-matlab
 
 m-unit-tests/src/mtest.m:
-	git clone https://git.dynare.org/Dynare/m-unit-tests
+	git clone https://git.dynare.org/Dynare/m-unit-tests && cd m-unit-tests && git checkout 343d9e13654a07c348fad863f7f79a03896c6bc9
 
 check-octave: m-unit-tests/src/mtest.m
 	@cd tests ;\