/[escript]/trunk/mk
ViewVC logotype

Diff of /trunk/mk

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 125 by jgs, Fri Jul 22 03:52:49 2005 UTC revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC
# Line 10  Line 10 
10  #**********************************************************************  #**********************************************************************
11    
12  # the modules to make  # the modules to make
13  MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley"  MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley bruce modellib"
14    
15  # the tests to run  # the modules to test
16  TESTS="escript finley"  TESTS="escript finley bruce"
17    
18    # the python tests to run
19    FINLEY_PYTESTS="ImportTest.py SimpleSolve.py GradTest.py test_linearPDEsOnFinley.py"
20    ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py escriptTest.py DataVariableTests.py test_xml.py pdetoolsTest.py"
21    BRUCE_PYTESTS="ImportTest.py"
22    
23  # use this setting for local developmental builds  # use this setting for local developmental builds
24  #ENVVARS="DODEBUG=YES"  ENVVARS="DODEBUG=YES"
25    
26  if [ "$2" == "DEBUG" ];  if [ "$2" == "DEBUG" ]
27  then  then
28      ENVVARS="DODEBUG=YES"      ENVVARS="DODEBUG=YES"
29  fi  fi
30    
31  if [ "$2" == "NODEBUG" ];  if [ "$2" == "NODEBUG" ]
32  then  then
33      ENVVARS="DODEBUG=NO"      ENVVARS="DODEBUG=NO"
34  fi  fi
35    
36  # use this setting for production installs on altix  # use this setting for production installs on altix
37  # ** NB: overwrites centrally installed esys libraries on altix ***  # ** NB: overwrites centrally installed esys libraries on altix ***
38  #ENVVARS="L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"  #ENVVARS="$ENVVARS L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"
39    
40  # ensure required symlinks are setup first  # ensure required symlinks are setup first
 (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)  
41  (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)  (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)
42    (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)
43  (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)  (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)
44    (cd bruce/inc; if [ ! -h bruce ]; then ln -s ../src bruce; fi)
45    
 (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)  
 (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)  
 (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)  
46  (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)  (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)
47  (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)  (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)
48    (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)
49    (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)
50    (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)
51    (cd bruce; if [ ! -h Makefile ]; then ln -s ./bruce.mk Makefile; fi)
52    (cd modellib; if [ ! -h Makefile ]; then ln -s ./modellib.mk Makefile; fi)
53    
54  # clean all modules  # clean all modules
55  if [ "$1" == "clean" ];  if [ "$1" == "clean" ]
56  then  then
57      for module in $MODULES ; do \      for module in $MODULES ; do
58          (echo Cleaning: $module; cd $module; gmake clean) \          (echo Cleaning: $module; cd $module; make clean)
59      done      done
60          exit          exit 0
61  fi  fi
62    
63  # uninstall all modules  # uninstall all modules
64  if [ "$1" == "uninstall" ];  if [ "$1" == "uninstall" ]
65  then  then
66      for module in $MODULES ; do \      for module in $MODULES ; do
67          (echo Cleaning: $module; cd $module; gmake uninstall) \          (echo Cleaning: $module; cd $module; make clean)
68      done      done
69          exit      for module in $MODULES ; do
70  fi          (echo Uninstalling: $module; cd $module; make uninstall)
   
 # default case - just build all modules  
 for module in $MODULES ; do \  
     (echo Building: $module; cd $module; env $ENVVARS gmake -j 10) \  
 done  
   
 # install all modules  
 if [ "$1" == "install" ];  
 then  
     for module in $MODULES ; do \  
         (echo Installing: $module; cd $module; env $ENVVARS gmake install) \  
71      done      done
72          (cd esys; if [ ! -h escriptcpp.so ]; then ln -s ../lib/libescriptcpp.so escriptcpp.so; fi)          exit 0
         (cd esys; if [ ! -h finleycpp.so ]; then ln -s ../lib/libfinleycpp.so finleycpp.so; fi)  
73  fi  fi
74    
75  # run the unit tests  # run the unit tests
# Line 83  then Line 79  then
79      do      do
80      echo "Running unit tests for: $module"      echo "Running unit tests for: $module"
81      cd $ESYS_ROOT/$module/test      cd $ESYS_ROOT/$module/test
82      unit_test      ./unit_test
83            if [ $? != 0 ]
84            then
85              echo Unit Testing FAILED for module: $module
86              exit 1
87            fi
88      done      done
89        exit 0
90  fi  fi
91    
92  # run the python tests  # run the python tests
# Line 93  then Line 95  then
95      for module in $TESTS      for module in $TESTS
96      do      do
97      echo "Running python tests for: $module"      echo "Running python tests for: $module"
98        cd $ESYS_ROOT/$module/test/python
99      if [ "$module" == "finley" ]      if [ "$module" == "finley" ]
100      then      then
101          cd $ESYS_ROOT/$module/test/python              for pytest in $FINLEY_PYTESTS
102              python ImportTest.py              do
103          python SimpleSolve.py              echo "Running python test: $pytest"
104          python GradTest.py                  python $pytest
105                    if [ $? != 0 ]
106                    then
107                      echo Python Testing FAILED for $pytest in module $module
108                      exit 1
109                    fi
110                done
111      elif [ "$module" == "escript" ]      elif [ "$module" == "escript" ]
112      then      then
113          cd $ESYS_ROOT/$module/test/python              for pytest in $ESCRIPT_PYTESTS
114              python ImportTest.py              do
115          python BinaryOps.py              echo "Running python test: $pytest"
116          python UnaryOps.py                  python $pytest
117          python SliceGetting.py                  if [ $? != 0 ]
118          python SliceSetting.py                  then
119              python MiscTests.py                    echo Python Testing FAILED for $pytest in module $module
120                      exit 1
121                    fi
122                done
123        elif [ "$module" == "bruce" ]
124        then
125                for pytest in $BRUCE_PYTESTS
126                do
127                echo "Running python test: $pytest"
128                    python $pytest
129                    if [ $? != 0 ]
130                    then
131                      echo Python Testing FAILED for $pytest in module $module
132                      exit 1
133                    fi
134                done
135      fi      fi
136      done      done
137        exit 0
138    fi
139    
140    # default case - just build all modules
141    echo "*************** build ************************************"
142    for module in $MODULES ; do
143        (echo Building: $module; cd $module; env $ENVVARS make -j 10)
144            if [ $? != 0 ]
145            then
146                echo Build FAILED for module: $module
147                exit 1
148            fi
149    done
150    
151    # install all modules
152    if [ "$1" == "install" ]
153    then
154            echo "***************installation ************************************"
155        for module in $MODULES ; do \
156                    echo ENVVARS = $ENVVARS
157            (echo Installing: $module; cd $module; env $ENVVARS make install)
158                    if [ $? != 0 ]
159                    then
160                      echo Installation FAILED for module: $module
161                      exit 1
162                    fi
163        done
164            (cd esys; touch __init__.py)
165            (cd esys/escript; if [ ! -h escriptcpp.so ]; then ln -s ../../lib/libescriptcpp.so escriptcpp.so; fi)
166            (cd esys/finley; if [ ! -h finleycpp.so ]; then ln -s ../../lib/libfinleycpp.so finleycpp.so; fi)
167            (cd esys/bruce; if [ ! -h brucecpp.so ]; then ln -s ../../lib/libbrucecpp.so brucecpp.so; fi)
168            exit 0
169  fi  fi

Legend:
Removed from v.125  
changed lines
  Added in v.149

  ViewVC Help
Powered by ViewVC 1.1.26