From d79c372de480098e087b760ba1fd9ee698a1a48f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 24 Jan 2020 16:40:16 +0100
Subject: [PATCH] CI: skip two further tests under MATLAB R2009b, that
 apparently trigger a MATLAB bug

(cherry picked from commit 01d5d734c66914205009884bba80434ece90c585)
---
 .../analytic_derivatives/BrockMirman_PertParamsDerivs.mod | 5 +++++
 .../LindeTrabandt/LindeTrabandt2019_xfail.mod             | 8 ++++++++
 2 files changed, 13 insertions(+)

diff --git a/tests/analytic_derivatives/BrockMirman_PertParamsDerivs.mod b/tests/analytic_derivatives/BrockMirman_PertParamsDerivs.mod
index 638735851d..e2b407c492 100644
--- a/tests/analytic_derivatives/BrockMirman_PertParamsDerivs.mod
+++ b/tests/analytic_derivatives/BrockMirman_PertParamsDerivs.mod
@@ -125,6 +125,10 @@ end;
 calib_params = M_.params;
 calib_Sigma_e = M_.Sigma_e;
 
+/* Skip test under MATLAB R2009b
+   MATLAB crashes, most likely due to an internal bug */
+if isoctave || ~matlab_ver_less_than('7.10')
+
 stoch_simul(order=@{ORDER},nograph,irf=0,periods=0);
 identification(order=@{ORDER},nograph,no_identification_strength);
 
@@ -472,3 +476,4 @@ for jj = 1:2
     end
 end
 
+end % Skip test under old MATLAB
diff --git a/tests/identification/LindeTrabandt/LindeTrabandt2019_xfail.mod b/tests/identification/LindeTrabandt/LindeTrabandt2019_xfail.mod
index 1dcf57b2de..9494da438e 100644
--- a/tests/identification/LindeTrabandt/LindeTrabandt2019_xfail.mod
+++ b/tests/identification/LindeTrabandt/LindeTrabandt2019_xfail.mod
@@ -370,6 +370,10 @@ steady;
 resid;
 check;
 
+/* Skip test under MATLAB R2009b
+   MATLAB crashes, most likely due to an internal bug */
+if isoctave || ~matlab_ver_less_than('7.10')
+
 identification(order=1,no_identification_strength,analytic_derivation_mode= 0,ar=5); %works
 %identification(no_identification_strength,analytic_derivation_mode= 1,ar=5); %works, this takes the longest due to Kronecker products
 options_.dynatol.x = 1e-9;
@@ -378,3 +382,7 @@ identification(order=1,no_identification_strength,analytic_derivation_mode=-2,ar
 options_.dynatol.x = 1e-5; %this is the default value
 identification(order=1,no_identification_strength,analytic_derivation_mode=-1,ar=5); %works only if GBAR_o_YBAR is uncommented
 identification(order=1,no_identification_strength,analytic_derivation_mode=-2,ar=5); %works only if GBAR_o_YBAR is uncommented
+
+else % Skip test under old MATLAB
+  error('Test failed as expected')
+end
-- 
GitLab