Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dseries
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dynare
dseries
Commits
94de7770
Commit
94de7770
authored
Nov 26, 2015
by
Stéphane Adjemian (Charybdis)
Committed by
Stéphane Adjemian (Hermes)
Feb 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Makefile for running all the unit tests.
parent
bf79dbce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
9 deletions
+35
-9
Makefile
Makefile
+11
-0
success.sh
success.sh
+5
-0
tests/runalltests.m
tests/runalltests.m
+19
-9
No files found.
Makefile
0 → 100644
View file @
94de7770
OCTAVE
=
octave-cli
MATLAB
=
`
which matlab
`
all
:
check-octave check-matlab
check-octave
:
@
cd
tests
;
\
$(OCTAVE)
--no-init-file
--silent
--no-history
runalltests.m
check-matlab
:
@
$(MATLAB)
-nosplash
-nodisplay
-r
"cd tests; runalltests; quit"
success.sh
0 → 100755
View file @
94de7770
#!/bin/sh
if
[
-f
./tests/failed
]
then
exit
1
fi
tests/runall
dseries
tests.m
→
tests/runalltests.m
View file @
94de7770
opath
=
path
();
system
(
'rm -f failed'
);
% Check that the m-unit-tests module is available.
install_unit_test_toolbox
=
false
;
...
...
@@ -8,12 +10,12 @@ try
initialize_unit_tests_toolbox
;
catch
urlwrite
(
'https://github.com/DynareTeam/m-unit-tests/archive/master.zip'
,
'master.zip'
);
warning
(
'off'
,
'MATLAB:MKDIR:DirectoryExists'
)
mkdir
(
'../externals'
)
warning
(
'on'
,
'MATLAB:MKDIR:DirectoryExists'
)
unzip
(
'master.zip'
,
'../externals'
)
delete
(
'master.zip'
)
addpath
([
pwd
()
'/../externals/m-unit-tests-master/src'
])
warning
(
'off'
,
'MATLAB:MKDIR:DirectoryExists'
)
;
mkdir
(
'../externals'
)
;
warning
(
'on'
,
'MATLAB:MKDIR:DirectoryExists'
)
;
unzip
(
'master.zip'
,
'../externals'
)
;
delete
(
'master.zip'
)
;
addpath
([
pwd
()
'/../externals/m-unit-tests-master/src'
])
;
initialize_unit_tests_toolbox
;
install_unit_test_toolbox
=
true
;
end
...
...
@@ -22,18 +24,26 @@ end
try
initialize_dseries_toolbox
;
catch
unit_tests_root
=
strrep
(
which
(
'runall
dseriestests'
),
'runalldseries
tests.m'
,
''
);
unit_tests_root
=
strrep
(
which
(
'runall
tests'
),
'runall
tests.m'
,
''
);
addpath
([
unit_tests_root
'../src'
]);
initialize_dseries_toolbox
;
end
if
isoctave
more
off
;
end
tmp
=
dseries_src_root
;
tmp
=
tmp
(
1
:
end
-
1
);
% Remove trailing slash.
run_unitary_tests_in_directory
(
tmp
);
r
eport
=
r
un_unitary_tests_in_directory
(
tmp
);
delete
(
'*.log'
);
if
install_unit_test_toolbox
rmdir
(
'../externals/m-unit-tests-master'
,
's'
);
end
path
(
opath
);
\ No newline at end of file
path
(
opath
);
if
any
(
~
[
report
{:,
3
}])
system
(
'touch failed'
);
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment