diff --git a/tests/.gitignore b/tests/.gitignore index d9005b21ce9d14b6e7fc394d683b906cee44f379..ee1c260a330898e602058c2234e49da111811597 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 6f5b2ab4a35b86afa3dec4e41849269181a6b736..737534115405f547e91defd6621c57479f9758ce 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 302653311f98bfed36f795188d5d8a67219fbf6f..0a4c5ec00545853b6de63b6a87d296a1fe206fd0 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 <https://www.gnu.org/licenses/>. 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 0e979db802afc185f9ce8bc390b32d75ace62021..0a881d8c4358c7a6130caa4c4801815e2f320a69 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 <https://www.gnu.org/licenses/>. -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 1d6ce0dcb534e62576b8ab0e004d05527c1aebf4..d1fea8851da023c3f7dda287f2c2b240605b6e99 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 <https://www.gnu.org/licenses/>. -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 458e457071e0b3add478428fa3088bb98f2d873f..29495cae24e43d93ad0bc6420a40c464db492918 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