/[escript]/trunk/mk
ViewVC logotype

Diff of /trunk/mk

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

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

Legend:
Removed from v.122  
changed lines
  Added in v.174

  ViewVC Help
Powered by ViewVC 1.1.26