File: buildtestmatlab.sh

package info (click to toggle)
calceph 4.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,944 kB
  • sloc: ansic: 21,414; fortran: 4,054; python: 1,569; sh: 197; makefile: 5
file content (16 lines) | stat: -rwxr-xr-x 589 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh
rm -f testmatlab.m
echo "addpath('../src/')" >testmatlab.m
echo "mex -v -I../../src/ ../src/interfacemex.c -L../../src/.libs/ -lcalceph" >>testmatlab.m
echo "success=true;" >>testmatlab.m
#grep '%!' *.m | sed -e 's/%!//g' | awk -F ":"  -v q="'" '{ printf "'\''test...%s'\''\nsuccess&=%s\n", $1, $2 }' >>testmatlab.m
grep '%!' *.m | sed -e 's/%!//g' | awk -F ":"  -v q="'" '{ printf "'\''test...%s'\''\n%s\n", $1, $2 }' >>testmatlab.m
cat - >>testmatlab.m <<__EOF
if (success==true)
disp('all tests are OK')
%    exit(0)
else
disp('some tests are BAD')
%    exit(1)
end   
__EOF