Skip to content
Snippets Groups Projects
Commit 4966eea3 authored by sebastien's avatar sebastien
Browse files

4.0: merged r2760 changeset from trunk (testsuite for Octave)

git-svn-id: https://www.dynare.org/svn/dynare/branches/4.0@2762 ac1d8469-bf42-47a9-8791-bf33cf982152
parent f4cf28de
No related branches found
Tags
No related merge requests found
# Makefile for creating the source tarball
DYNARE_VERSION=4.0.4
DYNAREBASE=dynare-4.0.4
DYNAREBASE=dynare-$(DYNARE_VERSION)
all:
.PHONY: all
check:
make -C tests $@ DYNARE_VERSION=$(DYNARE_VERSION)
.PHONY: check
srctarball:
make -C preprocessor clean
make -C doc clean
make -C tests clean
rm -f matlab/dynare_m matlab/dynare_m.exe
rm -f mex/2007a/* mex/2007b/* mex/octave/*.mex
rm -f windows/*.exe
tar cvzf ../$(DYNAREBASE).tar.gz --transform 's,^\./,$(DYNAREBASE)/,' --exclude=debian --exclude='*~' --exclude-vcs .
.PHONY: srctarball
OCTAVE = octave
DYNARE_ROOT = `pwd`/../matlab
# Under Octave we only test a subset of MOD files, because of missing features (models with unit roots, reading Excel files)
OCTAVE_MODS = \
ramst.mod \
ramst_a.mod \
example1.mod \
t_sgu_ex1.mod \
arima/mod1.mod \
arima/mod1a.mod \
arima/mod2.mod \
arima/mod2c.mod \
fs2000/fs2000.mod \
homotopy/ramst_homotopy.mod
MODS = $(OCTAVE_MODS) \
arima/mod1b.mod \
arima/mod1c.mod \
arima/mod2a.mod \
arima/mod2b.mod \
fs2000/fs2000a.mod \
bvar_a_la_sims/bvar_standalone.mod \
bvar_a_la_sims/bvar_and_dsge.mod
check: check-octave check-matlab
.PHONY: check
check-octave: $(OCTAVE_MODS)
ifdef OCTAVE
@set -e; \
for modfile in $(OCTAVE_MODS); do \
GNUTERM=dumb $(OCTAVE) --norc --silent --no-history run_test_octave.m $$modfile $(DYNARE_ROOT) $(DYNARE_VERSION); \
done
endif
.PHONY: check-octave
check-matlab: $(MODS)
# MATLAB stuff to be added here
.PHONY: check-matlab
clean:
# Files generated by the preprocessor
rm -f $(patsubst %.mod, %.m, $(MODS)) \
$(patsubst %.mod, %_static.m, $(MODS)) \
$(patsubst %.mod, %_dynamic.m, $(MODS))
# Results
rm -f $(patsubst %.mod, %_results.mat, $(MODS)) \
$(patsubst %.mod, %_mode.mat, $(MODS)) \
$(patsubst %.mod, %_mh_mode.mat, $(MODS)) \
$(patsubst %.mod, %_mean.mat, $(MODS)) \
$(patsubst %.mod, %_pindx.mat, $(MODS)) \
$(patsubst %.mod, %_params.mat, $(MODS)) \
$(patsubst %.mod, %.log, $(MODS))
rm -rf $(patsubst %.mod, %, $(MODS))
# Graphics
rm -f $(patsubst %.mod, %*.pdf, $(MODS)) \
$(patsubst %.mod, %*.eps, $(MODS)) \
$(patsubst %.mod, %*.fig, $(MODS))
# Files generated by csminwel.m
rm -f $(shell find -name g1.mat) \
$(shell find -name g2.mat) \
$(shell find -name g3.mat) \
$(shell find -name H.dat)
# Generated data files
rm -f arima/data1.m arima/data2.m
# Backup files
rm -f $(shell find -name '*~')
.PHONY: clean
## Copyright (C) 2009 Dynare Team
##
## This file is part of Dynare.
##
## Dynare is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## Dynare is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
## First argument is MOD file (possibly with a path prefix)
## Second argument is path to Dynare installation to be checked
## Third argument is Dynare version to be checked
[directory, name, ext] = fileparts(argv(){1});
printf("TEST: %s...\n", name)
addpath(argv(){2})
if !strcmp(dynare_version(), argv(){3})
error("Incorrect version of Dynare is being tested")
endif
cd(directory)
dynare(name)
## Local variables:
## mode: Octave
## End:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment