Rev 3 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3 | Rev 8948 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | # earlier-compiled exercises before recompiling. |
7 | # earlier-compiled exercises before recompiling. |
8 | # |
8 | # |
9 | 9 | ||
10 | # base directory. |
10 | # base directory. |
11 | 11 | ||
12 | echo "This script is now obsolete. Blocked." |
- | |
13 | exit |
12 | |
14 | 13 | ||
15 | test=`dirname $0` |
14 | test=`dirname $0` |
16 | if [ -z "$test" ]; then WIMS_HOME=..; else WIMS_HOME=$test/..; fi |
15 | if [ -z "$test" ]; then WIMS_HOME=..; else WIMS_HOME=$test/..; fi |
17 | cd $WIMS_HOME |
16 | cd $WIMS_HOME |
18 | WIMS_HOME=`pwd` |
17 | WIMS_HOME=`pwd` |
19 | PATH=$PATH:$WIMS_HOME/other/bin |
18 | PATH=$PATH:$WIMS_HOME/other/bin |
20 | module_dir=$WIMS_HOME/public_html/modules |
19 | module_dir=$WIMS_HOME/public_html/modules |
- | 20 | WIMS_OEFTEST=$WIMS_HOME/wimstest/ALLOEF |
|
- | 21 | if [ "$1" = "test" ]; then |
|
- | 22 | mkdir -p $WIMS_OEFTEST |
|
- | 23 | else |
|
- | 24 | echo "This script must be used for test with argument test ; now obsolete. Blocked." |
|
- | 25 | exit |
|
- | 26 | fi |
|
21 | 27 | ||
22 | cd $module_dir |
28 | cd $module_dir |
23 | 29 | ||
24 | candidates=`find [A-Zlc]* -name src -type d | sed 's!/src$!!'` |
30 | candidates=`find [A-Zlc]* -name src -type d | sed 's!/src$!!'` |
25 | 31 | ||
Line 31... | Line 37... | ||
31 | srccnt=`ls $d/src/*.oef 2>/dev/null | grep -c '\.oef$'` |
37 | srccnt=`ls $d/src/*.oef 2>/dev/null | grep -c '\.oef$'` |
32 | if [ $srccnt -eq 0 ]; then continue; fi |
38 | if [ $srccnt -eq 0 ]; then continue; fi |
33 | cd $d |
39 | cd $d |
34 | if [ "$1" = "clean" ]; then |
40 | if [ "$1" = "clean" ]; then |
35 | rm -f def/*.def 2>/dev/null |
41 | rm -f def/*.def 2>/dev/null |
- | 42 | fi |
|
- | 43 | if [ "$1" = "test" ]; then |
|
- | 44 | rm -rf def.orig |
|
- | 45 | cp -r def def.orig |
|
36 | fi |
46 | fi |
37 | src2def >/dev/null 2>&1 |
47 | src2def >/dev/null 2>&1 |
38 | defcnt=`ls def/*.def 2>/dev/null | grep -c '\.def$'` |
48 | defcnt=`ls def/*.def 2>/dev/null | grep -c '\.def$'` |
39 | if [ $defcnt -gt $srccnt ]; then defcnt=$srccnt; fi |
49 | if [ $defcnt -gt $srccnt ]; then defcnt=$srccnt; fi |
40 | failcnt=`expr $srccnt - $defcnt` |
50 | failcnt=`expr $srccnt - $defcnt` |
Line 42... | Line 52... | ||
42 | deftotal=`expr $deftotal + $defcnt` |
52 | deftotal=`expr $deftotal + $defcnt` |
43 | if [ $failcnt -gt 0 ]; then |
53 | if [ $failcnt -gt 0 ]; then |
44 | echo $d: $srccnt sources, $defcnt compiled, $failcnt failure. |
54 | echo $d: $srccnt sources, $defcnt compiled, $failcnt failure. |
45 | else |
55 | else |
46 | echo $d: $srccnt sources, OK. |
56 | echo $d: $srccnt sources, OK. |
- | 57 | fi |
|
- | 58 | if [ "$1" = "test" ]; then |
|
- | 59 | d1=`echo $d | sed "s,/,~,g"` |
|
- | 60 | echo "$d1 .........\c" |
|
- | 61 | rm -f "$WIMS_OEFTEST/$d1.diff" |
|
- | 62 | for ii in def.orig/* ; do |
|
- | 63 | jj=`basename $ii`; echo "Testing $jj... \c" |
|
- | 64 | if ! cmp def/$jj def.orig/$jj ; then |
|
- | 65 | echo "CHANGE in $d/$jj ...\c" |
|
- | 66 | diff -c def/$jj def.orig/$jj >> $WIMS_OEFTEST/$d1.diff |
|
- | 67 | fi |
|
- | 68 | done |
|
- | 69 | rm -rf def; mv def.orig def |
|
47 | fi |
70 | fi |
48 | cd $module_dir |
71 | cd $module_dir |
49 | done |
72 | done |
50 | 73 | ||
51 | failtotal=`expr $srctotal - $deftotal` |
74 | failtotal=`expr $srctotal - $deftotal` |