Commit 62db2878a2e3b1fbd619b3a0a476b95d337f3286

Authored by knodlseder
1 parent cfb5e5ea

initial version

Showing 1 changed file with 311 additions and 0 deletions
dev/macosx_testconf.sh 0 → 100755
  1 +#!/bin/bash -f
  2 +#############################################################################
  3 +# Test Mac OS X configuration #
  4 +# ------------------------------------------------------------------------- #
  5 +# Copyright (C) 2011 Jurgen Knodlseder #
  6 +# ------------------------------------------------------------------------- #
  7 +# #
  8 +# This program is free software: you can redistribute it and/or modify #
  9 +# it under the terms of the GNU General Public License as published by #
  10 +# the Free Software Foundation, either version 3 of the License, or #
  11 +# (at your option) any later version. #
  12 +# #
  13 +# This program is distributed in the hope that it will be useful, #
  14 +# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  15 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  16 +# GNU General Public License for more details. #
  17 +# #
  18 +# You should have received a copy of the GNU General Public License #
  19 +# along with this program. If not, see <http://www.gnu.org/licenses/>. #
  20 +# #
  21 +# ------------------------------------------------------------------------- #
  22 +# This script tests GammaLib under various Mac OS X configurations. The #
  23 +# main usage is for consolidation the ./configure script. #
  24 +# #
  25 +# Here the various tests and the expected outcome: #
  26 +# #
  27 +# Case A: Vanilla Mac OS X #
  28 +# A1 - 1 of 15 tests failed #
  29 +# A2 - All 15 tests passed #
  30 +# A3 - All 15 tests passed #
  31 +# A4 - All 15 tests passed #
  32 +# #
  33 +# Case B: Pure MacPorts install #
  34 +# B1 - All 15 tests passed #
  35 +# B2 - All 15 tests passed #
  36 +# #
  37 +# Case C: MacPorts cfitsio and Mac OS X Python #
  38 +# C1 - 1 of 15 tests failed #
  39 +# C2 - 1 of 15 tests failed #
  40 +# C3 - All 15 tests passed #
  41 +# C4 - All 15 tests passed #
  42 +# #
  43 +# Case D: MacPorts cfitsio and www.python.org #
  44 +# D1 - 1 of 15 tests failed #
  45 +# D2 - 1 of 15 tests failed #
  46 +# D3 - All 15 tests passed #
  47 +# D4 - All 15 tests passed #
  48 +# #
  49 +# Case E: Using 3-way cfitsio #
  50 +# E1 - 1 of 15 tests failed #
  51 +# E2 - All 15 tests passed #
  52 +# E3 - All 15 tests passed #
  53 +# E4 - All 15 tests passed #
  54 +# #
  55 +#############################################################################
  56 +
  57 +# Set working directory
  58 +wrkdir=/Users/jurgen/dev/gammalib
  59 +
  60 +# Step into working directory
  61 +cd $wrkdir
  62 +
  63 +# Set tests to be executed
  64 +do_A1="no"
  65 +do_A2="no"
  66 +do_A3="no"
  67 +do_A4="no"
  68 +do_B1="no"
  69 +do_B2="no"
  70 +do_C1="no"
  71 +do_C2="no"
  72 +do_C3="no"
  73 +do_C4="no"
  74 +#
  75 +do_D1="yes"
  76 +do_D2="yes"
  77 +do_D3="yes"
  78 +do_D4="yes"
  79 +do_E1="yes"
  80 +do_E2="yes"
  81 +do_E3="yes"
  82 +do_E4="yes"
  83 +
  84 +
  85 +#############################################################################
  86 +# Vanilla Mac OS X #
  87 +#############################################################################
  88 +
  89 +# Case A.1: Python 2.5
  90 +if [ "$do_A1" = "yes" ]; then
  91 + echo "Vanilla Build, Python 2.5 (./configure)"
  92 + rm -rf tmp
  93 + mkdir tmp
  94 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/intel/ tmp/
  95 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.5/bin:/usr/bin:/bin:/usr/sbin:/sbin
  96 + make distclean > /dev/null 2>&1
  97 + ./configure --prefix=$wrkdir/tmp > CaseA1_conf.log 2>&1
  98 + make -j10 > CaseA1_make.log 2>&1
  99 + make check > CaseA1_check.log 2>&1
  100 +fi
  101 +
  102 +# Case A.2: Python 2.5
  103 +if [ "$do_A2" = "yes" ]; then
  104 + echo "Vanilla Build, Python 2.5 (./configure --enable-universalsdk)"
  105 + rm -rf tmp
  106 + mkdir tmp
  107 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/intel/ tmp/
  108 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.5/bin:/usr/bin:/bin:/usr/sbin:/sbin
  109 + make distclean > /dev/null 2>&1
  110 + ./configure --prefix=$wrkdir/tmp --enable-universalsdk > CaseA2_conf.log 2>&1
  111 + make -j10 > CaseA2_make.log 2>&1
  112 + make check > CaseA2_check.log 2>&1
  113 +fi
  114 +
  115 +# Case A.3: Python 2.6
  116 +if [ "$do_A3" = "yes" ]; then
  117 + echo "Vanilla Build, Python 2.6 (./configure)"
  118 + rm -rf tmp
  119 + mkdir tmp
  120 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/intel/ tmp/
  121 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  122 + make distclean > /dev/null 2>&1
  123 + ./configure --prefix=$wrkdir/tmp > CaseA3_conf.log 2>&1
  124 + make -j10 > CaseA3_make.log 2>&1
  125 + make check > CaseA3_check.log 2>&1
  126 +fi
  127 +
  128 +# Case A.4: Python 2.6
  129 +if [ "$do_A4" = "yes" ]; then
  130 + echo "Vanilla Build, Python 2.6 (./configure --enable-universalsdk)"
  131 + rm -rf tmp
  132 + mkdir tmp
  133 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/intel/ tmp/
  134 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  135 + make distclean > /dev/null 2>&1
  136 + ./configure --prefix=$wrkdir/tmp --enable-universalsdk > CaseA4_conf.log 2>&1
  137 + make -j10 > CaseA4_make.log 2>&1
  138 + make check > CaseA4_check.log 2>&1
  139 +fi
  140 +
  141 +
  142 +#############################################################################
  143 +# Pure MacPorts #
  144 +#############################################################################
  145 +
  146 +# Case B.1: Pure MacPorts
  147 +if [ "$do_B1" = "yes" ]; then
  148 + echo "Pure MacPorts build (./configure)"
  149 + export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  150 + make distclean > /dev/null 2>&1
  151 + ./configure > CaseB1_conf.log 2>&1
  152 + make -j10 > CaseB1_make.log 2>&1
  153 + make check > CaseB1_check.log 2>&1
  154 +fi
  155 +
  156 +# Case B.2: Pure MacPorts
  157 +if [ "$do_B2" = "yes" ]; then
  158 + echo "Pure MacPorts build (./configure --enable-universalsdk)"
  159 + export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  160 + make distclean > /dev/null 2>&1
  161 + ./configure --enable-universalsdk > CaseB2_conf.log 2>&1
  162 + make -j10 > CaseB2_make.log 2>&1
  163 + make check > CaseB2_check.log 2>&1
  164 +fi
  165 +
  166 +
  167 +#############################################################################
  168 +# MacPorts cfitsio & Mac OS X Python #
  169 +#############################################################################
  170 +
  171 +# Case C.1:
  172 +if [ "$do_C1" = "yes" ]; then
  173 + echo "MacPorts cfitsio, Mac OS X Python 2.5 (./configure)"
  174 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.5/bin:/usr/bin:/bin:/usr/sbin:/sbin
  175 + make distclean > /dev/null 2>&1
  176 + ./configure > CaseC1_conf.log 2>&1
  177 + make -j10 > CaseC1_make.log 2>&1
  178 + make check > CaseC1_check.log 2>&1
  179 +fi
  180 +
  181 +# Case C.2:
  182 +if [ "$do_C2" = "yes" ]; then
  183 + echo "MacPorts cfitsio, Mac OS X Python 2.5 (./configure --enable-universalsdk)"
  184 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.5/bin:/usr/bin:/bin:/usr/sbin:/sbin
  185 + make distclean > /dev/null 2>&1
  186 + ./configure --enable-universalsdk > CaseC2_conf.log 2>&1
  187 + make -j10 > CaseC2_make.log 2>&1
  188 + make check > CaseC2_check.log 2>&1
  189 +fi
  190 +
  191 +# Case C.3:
  192 +if [ "$do_C3" = "yes" ]; then
  193 + echo "MacPorts cfitsio, Mac OS X Python 2.6 (./configure)"
  194 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  195 + make distclean > /dev/null 2>&1
  196 + ./configure > CaseC3_conf.log 2>&1
  197 + make -j10 > CaseC3_make.log 2>&1
  198 + make check > CaseC3_check.log 2>&1
  199 +fi
  200 +
  201 +# Case C.4:
  202 +if [ "$do_C4" = "yes" ]; then
  203 + echo "MacPorts cfitsio, Mac OS X Python 2.6 (./configure --enable-universalsdk)"
  204 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  205 + make distclean > /dev/null 2>&1
  206 + ./configure --enable-universalsdk > CaseC4_conf.log 2>&1
  207 + make -j10 > CaseC4_make.log 2>&1
  208 + make check > CaseC4_check.log 2>&1
  209 +fi
  210 +
  211 +
  212 +#############################################################################
  213 +# MacPorts cfitsio & www.python.org #
  214 +#############################################################################
  215 +
  216 +# Case D.1:
  217 +if [ "$do_D1" = "yes" ]; then
  218 + echo "MacPorts cfitsio, www.python.org 32-bit (./configure)"
  219 + export PATH=/Users/jurgen/Software/python/python27/10.4/32-bit/bin:/usr/bin:/bin:/usr/sbin:/sbin
  220 + make distclean > /dev/null 2>&1
  221 + ./configure > CaseD1_conf.log 2>&1
  222 + make -j10 > CaseD1_make.log 2>&1
  223 + make check > CaseD1_check.log 2>&1
  224 +fi
  225 +
  226 +# Case D.2:
  227 +if [ "$do_D2" = "yes" ]; then
  228 + echo "MacPorts cfitsio, www.python.org 32-bit (./configure --enable-universalsdk)"
  229 + export PATH=/Users/jurgen/Software/python/python27/10.4/32-bit/bin:/usr/bin:/bin:/usr/sbin:/sbin
  230 + make distclean > /dev/null 2>&1
  231 + ./configure --enable-universalsdk > CaseD2_conf.log 2>&1
  232 + make -j10 > CaseD2_make.log 2>&1
  233 + make check > CaseD2_check.log 2>&1
  234 +fi
  235 +
  236 +# Case D.3:
  237 +if [ "$do_D3" = "yes" ]; then
  238 + echo "MacPorts cfitsio, www.python.org intel (./configure)"
  239 + export PATH=/Users/jurgen/Software/python/python27/10.6/intel/bin:/usr/bin:/bin:/usr/sbin:/sbin
  240 + make distclean > /dev/null 2>&1
  241 + ./configure > CaseD3_conf.log 2>&1
  242 + make -j10 > CaseD3_make.log 2>&1
  243 + make check > CaseD3_check.log 2>&1
  244 +fi
  245 +
  246 +# Case D.4:
  247 +if [ "$do_D4" = "yes" ]; then
  248 + echo "MacPorts cfitsio, www.python.org intel (./configure --enable-universalsdk)"
  249 + export PATH=/Users/jurgen/Software/python/python27/10.6/intel/bin:/usr/bin:/bin:/usr/sbin:/sbin
  250 + make distclean > /dev/null 2>&1
  251 + ./configure --enable-universalsdk > CaseD4_conf.log 2>&1
  252 + make -j10 > CaseD4_make.log 2>&1
  253 + make check > CaseD4_check.log 2>&1
  254 +fi
  255 +
  256 +
  257 +#############################################################################
  258 +# 3-way cfitsio #
  259 +#############################################################################
  260 +
  261 +# Case E.1: Python 2.5
  262 +if [ "$do_E1" = "yes" ]; then
  263 + echo "Vanilla Build, Python 2.5 (./configure)"
  264 + rm -rf tmp
  265 + mkdir tmp
  266 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/3-way/ tmp/
  267 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.5/bin:/usr/bin:/bin:/usr/sbin:/sbin
  268 + make distclean > /dev/null 2>&1
  269 + ./configure --prefix=$wrkdir/tmp > CaseE1_conf.log 2>&1
  270 + make -j10 > CaseE1_make.log 2>&1
  271 + make check > CaseE1_check.log 2>&1
  272 +fi
  273 +
  274 +# Case E.2: Python 2.5
  275 +if [ "$do_E2" = "yes" ]; then
  276 + echo "Vanilla Build, Python 2.5 (./configure --enable-universalsdk)"
  277 + rm -rf tmp
  278 + mkdir tmp
  279 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/3-way/ tmp/
  280 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.5/bin:/usr/bin:/bin:/usr/sbin:/sbin
  281 + make distclean > /dev/null 2>&1
  282 + ./configure --prefix=$wrkdir/tmp --enable-universalsdk > CaseE2_conf.log 2>&1
  283 + make -j10 > CaseE2_make.log 2>&1
  284 + make check > CaseE2_check.log 2>&1
  285 +fi
  286 +
  287 +# Case E.3: Python 2.6
  288 +if [ "$do_E3" = "yes" ]; then
  289 + echo "Vanilla Build, Python 2.6 (./configure)"
  290 + rm -rf tmp
  291 + mkdir tmp
  292 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/3-way/ tmp/
  293 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  294 + make distclean > /dev/null 2>&1
  295 + ./configure --prefix=$wrkdir/tmp > CaseE3_conf.log 2>&1
  296 + make -j10 > CaseE3_make.log 2>&1
  297 + make check > CaseE3_check.log 2>&1
  298 +fi
  299 +
  300 +# Case E.4: Python 2.6
  301 +if [ "$do_E4" = "yes" ]; then
  302 + echo "Vanilla Build, Python 2.6 (./configure --enable-universalsdk)"
  303 + rm -rf tmp
  304 + mkdir tmp
  305 + cp -r /Users/jurgen/Software/cfitsio/cfitsio3280/3-way/ tmp/
  306 + export PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin
  307 + make distclean > /dev/null 2>&1
  308 + ./configure --prefix=$wrkdir/tmp --enable-universalsdk > CaseE4_conf.log 2>&1
  309 + make -j10 > CaseE4_make.log 2>&1
  310 + make check > CaseE4_check.log 2>&1
  311 +fi
... ...