Commit 44b399c64a0f861019e011dae495542f6580a625

Authored by knodlseder
1 parent c32ca0a7

initial version

Showing 1 changed file with 58 additions and 0 deletions
test/test_cscripts.sh 0 → 100755
  1 +#! /bin/bash
  2 +# ==========================================================================
  3 +# This script tests all cscripts that are shipped with ctatools
  4 +#
  5 +# Copyright (C) 2011 Jurgen Knodlseder
  6 +#
  7 +# This program is free software: you can redistribute it and/or modify
  8 +# it under the terms of the GNU General Public License as published by
  9 +# the Free Software Foundation, either version 3 of the License, or
  10 +# (at your option) any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU General Public License for more details.
  16 +#
  17 +# You should have received a copy of the GNU General Public License
  18 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
  19 +#
  20 +# ==========================================================================
  21 +
  22 +#
  23 +# Print Header
  24 +#
  25 +echo ""
  26 +echo "*****************"
  27 +echo "* Test cscripts *"
  28 +echo "*****************"
  29 +
  30 +
  31 +#
  32 +# Remove any existing result files
  33 +# ================================
  34 +rm -rf *.fits *.log *.xml *.dat
  35 +
  36 +
  37 +#
  38 +# Creates pfiles directory
  39 +# ========================
  40 +mkdir -p pfiles
  41 +#cp -r ../src/*/*.par pfiles/
  42 +#export PFILES=pfiles
  43 +
  44 +
  45 +#
  46 +# Test cssens
  47 +# ===========
  48 +echo -n "Test cssens: "
  49 +cssens duration=3600.0
  50 +echo -n "."
  51 +if [ -s "sensitivity.dat" ]
  52 +then
  53 + echo -n "."
  54 +else
  55 + echo " sensitivity.dat file is not valid"
  56 + exit 1
  57 +fi
  58 +echo " ok"
... ...