diff --git a/tests/.gitignore b/tests/.gitignore index d9005b21c..ee1c260a3 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -90,7 +90,7 @@ wsOct !/kalman_steady_state/test1.m !/kronecker/nash_matrices.mat !/kronecker/test_kron.m -!/load_octave_packages.m +!/utils/load_octave_packages.m !/ls2003/data_ca1.m !/logarithmicreduction.m !/measurement_errors/data_ca1.m diff --git a/tests/Makefile.am b/tests/Makefile.am index 6f5b2ab4a..737534115 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1302,7 +1302,7 @@ EXTRA_DIST = \ run_test_matlab.m \ run_test_octave.m \ run_m_script.m \ - load_octave_packages.m \ + utils/load_octave_packages.m \ $(MODFILES) \ $(PARTICLEFILES) \ $(XFAIL_MODFILES) \ diff --git a/tests/run_all_unit_tests.m b/tests/run_all_unit_tests.m index 302653311..0a4c5ec00 100644 --- a/tests/run_all_unit_tests.m +++ b/tests/run_all_unit_tests.m @@ -16,6 +16,7 @@ % along with Dynare. If not, see . top_test_dir = getenv('TOP_TEST_DIR'); +addpath([top_test_dir filesep 'utils']); addpath([top_test_dir filesep '..' filesep 'matlab']); dynare_config(); diff --git a/tests/run_o_script.m b/tests/run_o_script.m index 0e979db80..0a881d8c4 100644 --- a/tests/run_o_script.m +++ b/tests/run_o_script.m @@ -1,4 +1,4 @@ -## Copyright © 2015-2019 Dynare Team +## Copyright © 2015-2023 Dynare Team ## ## This file is part of Dynare. ## @@ -15,11 +15,11 @@ ## You should have received a copy of the GNU General Public License ## along with Dynare. If not, see . -load_octave_packages - top_test_dir = getenv('TOP_TEST_DIR'); addpath([top_test_dir filesep 'utils']); +load_octave_packages + [mfile, name] = strtok(getenv('FILESTEM')); [directory, mscript, ext] = fileparts([top_test_dir '/' mfile]); diff --git a/tests/run_reporting_test_octave.m b/tests/run_reporting_test_octave.m index 1d6ce0dcb..d1fea8851 100644 --- a/tests/run_reporting_test_octave.m +++ b/tests/run_reporting_test_octave.m @@ -1,4 +1,4 @@ -## Copyright © 2013-2022 Dynare Team +## Copyright © 2013-2023 Dynare Team ## ## This file is part of Dynare. ## @@ -15,11 +15,12 @@ ## You should have received a copy of the GNU General Public License ## along with Dynare. If not, see . -load_octave_packages - top_test_dir = getenv('TOP_TEST_DIR'); +addpath([top_test_dir filesep 'utils']); addpath([top_test_dir filesep '..' filesep 'matlab']); +load_octave_packages + ## Test Dynare Version if !strcmp(dynare_version(), getenv("DYNARE_VERSION")) error("Incorrect version of Dynare is being tested") diff --git a/tests/run_test_octave.m b/tests/run_test_octave.m index 458e45707..29495cae2 100644 --- a/tests/run_test_octave.m +++ b/tests/run_test_octave.m @@ -1,4 +1,4 @@ -## Copyright © 2009-2022 Dynare Team +## Copyright © 2009-2023 Dynare Team ## ## This file is part of Dynare. ## @@ -21,12 +21,12 @@ ## 'wsOct', and reloaded after Dynare has finished (this is necessary since ## Dynare does a 'clear -all'). -load_octave_packages - top_test_dir = getenv('TOP_TEST_DIR'); addpath([top_test_dir filesep 'utils']); addpath([top_test_dir filesep '..' filesep 'matlab']); +load_octave_packages + ## Test Dynare Version if !strcmp(dynare_version(), getenv("DYNARE_VERSION")) error("Incorrect version of Dynare is being tested") diff --git a/tests/load_octave_packages.m b/tests/utils/load_octave_packages.m similarity index 100% rename from tests/load_octave_packages.m rename to tests/utils/load_octave_packages.m