From 2834bc1849b26eca54b5c8f4250c0856863c5e4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Mon, 1 Dec 2014 17:11:33 +0100
Subject: [PATCH] Fixed issue with path.

---
 src/run_unitary_tests_in_directory.m | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/run_unitary_tests_in_directory.m b/src/run_unitary_tests_in_directory.m
index 5485e6b..93ef397 100644
--- a/src/run_unitary_tests_in_directory.m
+++ b/src/run_unitary_tests_in_directory.m
@@ -33,6 +33,10 @@ function report = run_unitary_tests_in_directory(dirname, savereport, printrepor
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+INIT_PATH = pwd();
+
+cd(dirname);
+
 system('git show --pretty=format:"Last commit %H by %an, %ar %n-> %s" HEAD > git.info');
 system('git rev-parse HEAD > git.last-commit-hash');
 
@@ -45,6 +49,8 @@ fid = fopen('git.last-commit-hash');
 gitlastcommithash = fgetl(fid);
 fclose(fid);
 
+cd(INIT_PATH);
+
 matlabverion = version;
 platform = computer;
 
@@ -60,4 +66,4 @@ end
 
 if nargin>2
     build_report_summary(['report-' gitlastcommithash '.mat'], printreport, sendreport);
-end
\ No newline at end of file
+end
-- 
GitLab