Subversion Repositories wimsdev

Rev

Rev 13457 | Rev 14857 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8566 bpr 1
#! /bin/sh
2
### execute from wims_home
3
 
4
wims_home=`pwd`;
5
wims_dirsrc="$wims_home/wimstest/dirsrc";
8571 bpr 6
wims_tmp="$wims_home/wimstest/tmp";
8799 bpr 7
wims_res="$wims_home/wimstest/dirres";
8865 bpr 8
wims_dirtest="$wims_home/wimstest/dirtest";
8566 bpr 9
 
9045 bpr 10
wims_exec=`ls $wims_home/public_html/modules/moduletest/src`;
13457 obado 11
echo $wimsexec;
8865 bpr 12
mkdir -p $wims_tmp
13
mkdir -p $wims_tmp/diroef
8571 bpr 14
if [ "$1" ] ; then
15
  for a in $(seq $#) ; do opt=$1;
16
    $wims_dirsrc/$opt.sh > $wims_tmp/$opt;
17
    shift
18
  done;
10181 bpr 19
  exit
8571 bpr 20
else
21
  for i in `ls $wims_dirsrc/*.sh`; do
13457 obado 22
    j=`basename $i .sh`;
23
    msg1="Testing $j... ";
24
    $i > $wims_tmp/$j 2>&1
25
    if [ "$j" = "oef" ] ; then
26
      for ii in `ls $wims_dirtest/diroef/*` ; do
27
        jj=`basename $ii`; msg="$msg1 Testing $jj..."
28
        if ! cmp $wims_tmp/diroef/$jj $wims_res/diroef/$jj; then
29
          diff -c $wims_res/diroef/$jj $wims_tmp/diroef/$jj > $wims_tmp/diroef/$jj.diff;
30
          echo "$msg CHANGE";
31
        else
32
          echo "$msg OK";
33
          rm -f $wims_tmp/diroef/$jj.diff;
34
        fi
35
      done
36
    else
37
      if ! cmp $wims_tmp/$j $wims_res/$j; then
38
        diff -c $wims_res/$j $wims_tmp/$j > $wims_tmp/$j.diff;
39
        echo "$msg1 CHANGE";
40
      else
41
        echo "$msg1 OK";
42
        rm -f $wims_tmp/$j.diff;
43
      fi
44
    fi
8571 bpr 45
  done
9045 bpr 46
fi;
47
 
9150 bpr 48
list='append
49
commandtext
50
evalue
51
execution
52
hex
53
if
54
list
55
lookup
56
matrix
57
random record replace
58
solve
59
sort
10077 bpr 60
texmath text
13763 bpr 61
cutit
62
html2iso'
9150 bpr 63
 
64
for j in $list ; do
13457 obado 65
 
10181 bpr 66
    $wims_home/src/wims test $wims_dirtest $j vartest> $wims_tmp/$j 2>&1
67
   # echo "$wims_home/src/wims test $wims_dirtest $j vartest";
68
     msg="Testing $j ...";
9150 bpr 69
     if ! cmp $wims_tmp/$j $wims_res/$j; then
70
      diff -c $wims_res/$j $wims_tmp/$j > $wims_tmp/$j.diff;
10181 bpr 71
      echo "$msg CHANGE"
9150 bpr 72
     else
10181 bpr 73
      echo "$msg OK";
9181 bpr 74
      rm -f $wims_tmp/$j.diff;
9150 bpr 75
     fi
76
done
77
 
13457 obado 78
echo "\n--------------\nHTML TESTS : ";
79
 
9045 bpr 80
for j in $wims_exec ; do
10181 bpr 81
  msg="Testing $j ...";
9181 bpr 82
  wget "http://127.0.0.1/wims/wims.cgi?module=moduletest&cmd=new&special_parm=$j" -nv -O  $j.html 2>&1
9045 bpr 83
  $wims_home/wimstest/tag.pl --file=$j --out=$wims_tmp
84
   if ! cmp $wims_tmp/$j $wims_res/$j; then
85
      diff -c $wims_res/$j $wims_tmp/$j > $wims_tmp/$j.diff;
10181 bpr 86
      echo "$msg CHANGE"
9045 bpr 87
     else
10181 bpr 88
      echo "$msg OK"
9109 bpr 89
      rm -f $wims_tmp/$j.diff; rm $j.html;
9045 bpr 90
     fi
91
done
10196 bpr 92
 
13457 obado 93
echo "\n--------------\n Flydraw TESTS : ";
94
 
10196 bpr 95
$wims_home/wimstest/flydraw/flydraw.sh