Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9969a123 authored by hhakim's avatar hhakim
Browse files

Add matfaust test coverage ci job (using MOCov).

parent ac709a52
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ ctest_matlab:
tags:
- win10
doctest_nightly_pyfaust:
.doctest_nightly_pyfaust:
stage: test
script:
- if [[ ! -d 'build' ]]; then mkdir build;fi; cd build
......@@ -168,7 +168,7 @@ doctest_nightly_pyfaust:
except:
- tags
doctest_nightly_matfaust:
.doctest_nightly_matfaust:
stage: test
script:
# get latest successful ci job pkg_linux
......@@ -198,6 +198,41 @@ doctest_nightly_matfaust:
except:
- tags
matfaust_test_code_coverage:
stage: code_cov
script:
- rm -Rf ~gitlab-runner/matlab # avoid interference with rpm installed faust
# install mocov
# get latest successful ci job pkg_linux
- 'JOB_ID=$(curl -s --header "PRIVATE-TOKEN: $GITLAB_API_READ_TOKEN" "https://gitlab.inria.fr/api/v4/projects/6960/jobs?scope=success&per_page=10000" 2>&1 | tee -a /tmp/log_curl_doctest_matfaust | sed -e "s/}/}\n/g" | grep "\"pkg_linux\"" | head -1 | sed -ne "s/.*{\"id\":\([[:digit:]]\+\).*pkg_linux.*/\1/p") || echo JOB_ID=$JOB_ID'
# download artifact archive
- 'curl --header "PRIVATE-TOKEN: $GITLAB_API_READ_TOKEN" https://gitlab.inria.fr/api/v4/projects/6960/jobs/$JOB_ID/artifacts > artifacts.zip'
# what's in this?
- zip -Tv artifacts.zip
- yes | unzip artifacts.zip || echo 'artifacts unzipped'
- rm artifacts.zip
# install the pkg but first remove poential older one
- if [ $(rpm -qa faust | wc -l) -gt 0 ]; then sudo rpm -e faust;fi
- sudo rpm -i --nodeps build/faust*rpm
# install mocov
- git clone https://github.com/MOcov/MOcov.git
- cd MOcov
- make install
- cd ..
- matlab -nojvm -nodisplay -r "addpath misc/test/src/Matlab;matfaust_test_coverage; exit" | tee /tmp/matfaust_test_cov_output
after_script:
- if [ $(rpm -qa faust | wc -l) -gt 0 ]; then sudo rpm -e faust;fi
artifacts:
paths:
- coverage_html
tags:
- linux
- matlab
except:
- tags
only:
- schedules
pyfaust_test_code_coverage:
stage: code_cov
script:
......@@ -229,7 +264,7 @@ pyfaust_test_code_coverage:
- conda_linux
artifacts:
paths:
- htmlcov/index.html
- htmlcov
when: always
expire_in: '6 months'
needs:
......
......@@ -12,7 +12,9 @@ classdef FaustFactoryTest < matlab.unittest.TestCase
methods (TestMethodSetup)
function addFaustToPath(this)
addpath(this.faust_paths{:})
set_path
if exist('set_path') > 0
set_path
end
import matfaust.Faust
end
end
......
......@@ -22,7 +22,9 @@ classdef FaustTest < matlab.unittest.TestCase
methods (TestMethodSetup)
function addFaustToPath(this)
addpath(this.faust_paths{:})
set_path
if exist('set_path') > 0
set_path
end
import matfaust.Faust
end
......
% assuming we are in faust projet root directory
% but that faust is installed on /opt/local/faust with a sys package (on MacOS or Linux)
%system('git clone https://github.com/MOcov/MOcov.git')
%cd MOcov
%system('make install')
%profile on
%addpath(pwd)
%cd ..
% doctest part
profile on
addpath '/usr/share/octave/packages/doctest-0.7.0/'
setup_FAUST
doctest matfaust.proj.sp
doctest matfaust.proj.splin
doctest matfaust.proj.spcol
doctest matfaust.proj.splincol
doctest matfaust.proj.const
doctest matfaust.proj.supp
doctest matfaust.proj.normlin
doctest matfaust.proj.normcol
doctest matfaust.proj.blockdiag
doctest matfaust.proj.anticirc
doctest matfaust.proj.circ
doctest matfaust.proj.hankel
doctest matfaust.proj.skperm
doctest matfaust.proj.sptriu
doctest matfaust.proj.sptril
doctest matfaust.proj.spsymm
doctest matfaust.proj.toeplitz
doctest matfaust.proj.proj_id
doctest matfaust.poly.poly
doctest matfaust.poly.expm_multiply
doctest matfaust.poly.next
doctest matfaust.poly.basis
doctest matfaust.poly.expm_inv_multiply
doctest matfaust.factparams.ParamsHierarchicalWHTNoResCons
doctest matfaust.factparams.ParamsHierarchicalRectMatNoResCons
doctest matfaust.factparams.ParamsHierarchicalNoResCons
doctest matfaust.factparams.ParamsHierarchicalRectMat
doctest matfaust.fact.butterfly
doctest matfaust.fact.check_fact_mat
doctest matfaust.fact.eigtj
doctest matfaust.fact.fact
doctest matfaust.fact.fgft_palm
doctest matfaust.fact.hierarchical_constends
% doctest matfaust.fact.hierarchical % too heavy
doctest matfaust.fact.hierarchical_mhtp
doctest matfaust.fact.palm4msa_constends
doctest matfaust.fact.palm4msa
doctest matfaust.fact.palm4msa_mhtp
doctest matfaust.fact.pinvtj
doctest matfaust.fact.svdtj
doctest matfaust.tools.omp
doctest matfaust.demo.runall
% unit test part
addpath([ pwd 'misc/test/src/Matlab/'])
cd misc/test/src/Matlab;
FaustTest '../../../../misc/test/src/'
FaustFactoryTest '../../../../misc/test/src/'
% compute coverage
%mocov('-cover','/opt/local/faust/matlab/+matfaust',...
cd '../../../..'
mocov('-cover','/opt/local/faust/matlab/+matfaust',...
'-profile_info',...
'-cover_html_dir','coverage_html');
profile off
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment