Subversion Repositories wimsdev

Rev

Rev 13763 | 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
14857 bpr 62
html2iso
63
detag'
9150 bpr 64
 
65
for j in $list ; do
13457 obado 66
 
10181 bpr 67
    $wims_home/src/wims test $wims_dirtest $j vartest> $wims_tmp/$j 2>&1
68
   # echo "$wims_home/src/wims test $wims_dirtest $j vartest";
69
     msg="Testing $j ...";
9150 bpr 70
     if ! cmp $wims_tmp/$j $wims_res/$j; then
71
      diff -c $wims_res/$j $wims_tmp/$j > $wims_tmp/$j.diff;
10181 bpr 72
      echo "$msg CHANGE"
9150 bpr 73
     else
10181 bpr 74
      echo "$msg OK";
9181 bpr 75
      rm -f $wims_tmp/$j.diff;
9150 bpr 76
     fi
77
done
78
 
13457 obado 79
echo "\n--------------\nHTML TESTS : ";
80
 
9045 bpr 81
for j in $wims_exec ; do
10181 bpr 82
  msg="Testing $j ...";
9181 bpr 83
  wget "http://127.0.0.1/wims/wims.cgi?module=moduletest&cmd=new&special_parm=$j" -nv -O  $j.html 2>&1
9045 bpr 84
  $wims_home/wimstest/tag.pl --file=$j --out=$wims_tmp
85
   if ! cmp $wims_tmp/$j $wims_res/$j; then
86
      diff -c $wims_res/$j $wims_tmp/$j > $wims_tmp/$j.diff;
10181 bpr 87
      echo "$msg CHANGE"
9045 bpr 88
     else
10181 bpr 89
      echo "$msg OK"
9109 bpr 90
      rm -f $wims_tmp/$j.diff; rm $j.html;
9045 bpr 91
     fi
92
done
10196 bpr 93
 
13457 obado 94
echo "\n--------------\n Flydraw TESTS : ";
95
 
10196 bpr 96
$wims_home/wimstest/flydraw/flydraw.sh