Commit 37c81e5f10932d1177a92d01a48ad93f6dce7fa0

Authored by knodlseder
1 parent dcbf7be6

add section for testing examples

Showing 1 changed file with 32 additions and 6 deletions
testall.sh
1 #!/bin/sh 1 #!/bin/sh
2 -#  
3 -# Run all test and example scripts that come with the package 2 +# =====================================================================
  3 +# Run all test and example scripts that come with the package.
4 # 4 #
5 # Copyright (C) 2011 Jurgen Knodlseder 5 # Copyright (C) 2011 Jurgen Knodlseder
6 # 6 #
@@ -17,22 +17,48 @@ @@ -17,22 +17,48 @@
17 # You should have received a copy of the GNU General Public License 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/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # ===================================================================== 19 # =====================================================================
  20 +
  21 +#
  22 +# Save current working directory
  23 +# ==============================
20 base=$PWD 24 base=$PWD
21 25
22 26
  27 +#
23 # test 28 # test
24 # ==== 29 # ====
25 echo 30 echo
26 echo "=====> test" 31 echo "=====> test"
27 cd test 32 cd test
28 -./test_coverage.py "data/crab.xml" 10 pull.dat  
29 -./example_binned.py  
30 -./exmaple_models.py 33 +./example_models.py
31 ./example_survey.py 34 ./example_survey.py
32 -./example_unbinned.py  
33 cd $base 35 cd $base
34 36
35 37
  38 +#
  39 +# examples
  40 +# ========
  41 +echo
  42 +echo "=====> examples"
  43 +cd examples
  44 +
  45 +# Create local environment
  46 +rm -rf gammalib
  47 +mkdir -p gammalib/share
  48 +mkdir -p gammalib/share/caldb
  49 +ln -s $base/caldb gammalib/share/caldb/cta
  50 +ln -s $base/models gammalib/share/models
  51 +export GAMMALIB=./gammalib
  52 +
  53 +# Run examples
  54 +./make_binned_analysis.py
  55 +./make_unbinned_analysis.py
  56 +#./make_ts_distributions.py
  57 +#./make_pull_at_sensitivity_limit.py
  58 +cd $base
  59 +
  60 +
  61 +#
36 # Signal completion 62 # Signal completion
37 # ================= 63 # =================
38 echo 64 echo