/[escript]/trunk/mk
ViewVC logotype

Diff of /trunk/mk

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

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

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

  ViewVC Help
Powered by ViewVC 1.1.26