From 2666a4ce45ea3b36104dfbf833e2a9d2e5e4a88e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 15 Jan 2019 15:43:51 +0100
Subject: [PATCH] Dynare++: "make check" now fails if a numerical integration
 test fails

By the way, reactivate two tests that actually pass.
---
 dynare++/integ/testing/tests.cc | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/dynare++/integ/testing/tests.cc b/dynare++/integ/testing/tests.cc
index aae8651c94..fdb5bbd0cc 100644
--- a/dynare++/integ/testing/tests.cc
+++ b/dynare++/integ/testing/tests.cc
@@ -484,10 +484,9 @@ main()
   all_tests.push_back(std::make_unique<SmolyakNormalMom2>());
   all_tests.push_back(std::make_unique<ProductNormalMom1>());
   all_tests.push_back(std::make_unique<ProductNormalMom2>());
-  /*
-    all_tests.push_back(make_unique<F1GaussLegendre>());
-    all_tests.push_back(make_unique<F1QuasiMCarlo>());
-  */
+  all_tests.push_back(std::make_unique<F1GaussLegendre>());
+  all_tests.push_back(std::make_unique<F1QuasiMCarlo>());
+
   // find maximum dimension and maximum nvar
   int dmax = 0;
   int nvmax = 0;
@@ -522,8 +521,12 @@ main()
         }
     }
 
-  std::cout << "There were " << all_tests.size() - success << " tests that failed out of "
+  int nfailed = all_tests.size() - success;
+  std::cout << "There were " << nfailed << " tests that failed out of "
             << all_tests.size() << " tests run." << std::endl;
 
-  return EXIT_SUCCESS;
+  if (nfailed)
+    return EXIT_FAILURE;
+  else
+    return EXIT_SUCCESS;
 }
-- 
GitLab