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

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

  ViewVC Help
Powered by ViewVC 1.1.26