gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master ccc4e0c 2/2: Configure option for make check w


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master ccc4e0c 2/2: Configure option for make check with Valgrind
Date: Tue, 17 Jul 2018 06:24:30 -0400 (EDT)

branch: master
commit ccc4e0c2ecd6a27a35a0f94bb04b5c6d79ed65dc
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Configure option for make check with Valgrind
    
    When a segmentation fault occurs on a user's program during `make check',
    until now, it was necessary to ask the user to manually make changes in the
    source (which is really not a comfortable operation for the users who do
    not necessarily know about debugging or the test shell scripts).
    
    Therefore with this commit, a `--enable-check-with-valgrind' option was
    added to the configure script. This option will put the compilation options
    to debugging mode, check the existance of Valgrind on the user's system and
    run all the tests within Valgrind. This will include Valgrind's output in
    the `tests/test-suite.log' file, which is easy to transfer by email for
    example and will contain information about any crash.
    
    A corresponding `--valgrind' (or `-v') option was also added to the
    `developer-build' script that will use this new configure option.
---
 NEWS                                     |  1 +
 configure.ac                             | 24 +++++++++++++++++++++++-
 developer-build                          | 27 ++++++++++++++++++++++++---
 doc/gnuastro.texi                        | 26 ++++++++++++++++++++++++++
 tests/Makefile.am                        | 18 +++++++++++-------
 tests/arithmetic/connected-components.sh |  8 ++++++--
 tests/arithmetic/onlynumbers.sh          |  6 +++++-
 tests/arithmetic/or.sh                   |  6 +++++-
 tests/arithmetic/snimage.sh              |  8 ++++++--
 tests/arithmetic/where.sh                |  6 +++++-
 tests/buildprog/simpleio.sh              |  7 ++++++-
 tests/convertt/blankch.sh                |  6 +++++-
 tests/convertt/fitstojpeg.sh             |  6 +++++-
 tests/convertt/fitstojpegcmyk.sh         |  6 +++++-
 tests/convertt/fitstopdf.sh              |  6 +++++-
 tests/convertt/fitstotxt.sh              |  6 +++++-
 tests/convertt/jpegtofits.sh             |  6 +++++-
 tests/convertt/jpegtotxt.sh              |  6 +++++-
 tests/convolve/frequency.sh              |  7 ++++++-
 tests/convolve/spatial.sh                |  7 ++++++-
 tests/cosmiccal/simpletest.sh            |  6 +++++-
 tests/crop/imgcat.sh                     | 11 ++++++++---
 tests/crop/imgcenter.sh                  |  8 ++++++--
 tests/crop/imgcenternoblank.sh           |  9 +++++++--
 tests/crop/imgoutpolygon.sh              | 10 +++++++---
 tests/crop/imgpolygon.sh                 |  9 +++++++--
 tests/crop/section.sh                    |  8 ++++++--
 tests/crop/wcscat.sh                     | 11 ++++++++---
 tests/crop/wcscenter.sh                  |  9 +++++++--
 tests/crop/wcspolygon.sh                 |  9 +++++++--
 tests/fits/copyhdu.sh                    |  6 +++++-
 tests/fits/delete.sh                     |  6 +++++-
 tests/fits/print.sh                      |  6 +++++-
 tests/fits/update.sh                     |  8 ++++++--
 tests/fits/write.sh                      | 10 ++++++++--
 tests/lib/multithread.sh                 |  6 +++++-
 tests/lib/versioncxx.sh                  |  6 +++++-
 tests/match/merged-cols.sh               |  9 +++++++--
 tests/match/positions.sh                 |  7 ++++++-
 tests/mkcatalog/aperturephot.sh          | 10 +++++++---
 tests/mkcatalog/detections.sh            |  9 +++++++--
 tests/mkcatalog/objects-clumps.sh        |  9 +++++++--
 tests/mknoise/addnoise.sh                |  8 ++++++--
 tests/mkprof/clearcanvas.sh              |  9 +++++++--
 tests/mkprof/ellipticalmasks.sh          |  8 ++++++--
 tests/mkprof/mosaic1.sh                  |  7 ++++++-
 tests/mkprof/mosaic2.sh                  |  6 +++++-
 tests/mkprof/mosaic3.sh                  |  6 +++++-
 tests/mkprof/mosaic4.sh                  |  6 +++++-
 tests/mkprof/radeccat.sh                 |  7 ++++++-
 tests/noisechisel/noisechisel.sh         |  9 +++++++--
 tests/segment/segment.sh                 |  6 +++++-
 tests/statistics/basicstats.sh           |  6 +++++-
 tests/statistics/estimate_sky.sh         |  6 +++++-
 tests/table/fits-ascii-to-txt.sh         |  6 +++++-
 tests/table/fits-binary-to-txt.sh        |  6 +++++-
 tests/table/txt-to-fits-ascii.sh         |  7 ++++++-
 tests/table/txt-to-fits-binary.sh        |  7 ++++++-
 tests/warp/homographic.sh                |  8 ++++++--
 tests/warp/warp_scale.sh                 |  6 +++++-
 60 files changed, 407 insertions(+), 92 deletions(-)

diff --git a/NEWS b/NEWS
index d5ab9ba..5673995 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ GNU Astronomy Utilities NEWS                          -*- 
outline -*-
 
   Installation:
     --enable-debug: enable debugging flags and disable optimization.
+    --enable-check-with-valgrind: Run `make check' tests within Valgrind.
 
   Arithmetic:
     - `collapse-sum': collapse/remove a dimension by summing over it.
diff --git a/configure.ac b/configure.ac
index e43df75..95f6d0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,13 +87,35 @@ AC_DEFINE([IN_GNUASTRO_BUILD], [1], [In building, not 
usage])
 
 
 
+# See if `make check' should be made with Valgrind. This should be done
+# before checking the compilation flags because it can re-write
+# `enable-debug').
+AC_ARG_ENABLE(check-with-valgrind,
+              [AS_HELP_STRING([--enable-check-with-valgrind],
+                              [Run `make check' programs within Valgrind])],
+              [AS_IF([test "x$enable_check_with_valgrind" != xno],
+                     [enable_check_with_valgrind=yes])],
+              [enable_check_with_valgrind=no])
+AS_IF([test "x$enable_check_with_valgrind" = "xyes"],
+      [
+        enable_debug=yes;
+        AC_CHECK_PROG(has_valgrind, valgrind, [yes], [no])
+        AS_IF([test "x$has_valgrind" = "xno"],
+              [AC_MSG_ERROR([Valgrind not found. Please install it or don't 
use `--enable-check-with-valgrind'])])
+      ])
+AM_CONDITIONAL([COND_CHECK_WITH_VALGRIND], [test 
"x$enable_check_with_valgrind" = "xyes"])
+
+
+
+
+
 # Set the compilation flags.
 AC_ARG_ENABLE(debug,
               [AS_HELP_STRING([--enable-debug],
                               [No optimization, build with debug flags.])],
               [AS_IF([test "x$enable_debug" != xno], [enable_debug=yes])],
               [enable_debug=no])
-AS_IF([test "x$enable_debug" == "xyes"],
+AS_IF([test "x$enable_debug" = "xyes"],
       [cflags_add="-g -O0"],
       [cflags_add="-O3"])
 CFLAGS="-Wall $cflags_add $CFLAGS"
diff --git a/developer-build b/developer-build
index e72e2c0..e188c4d 100755
--- a/developer-build
+++ b/developer-build
@@ -44,6 +44,7 @@ check=0
 reconf=0
 upload=0
 install=0
+valgrind=0
 top_build_dir=/dev/shm
 if [ -f .version ]; then
     version=$(cat .version)
@@ -73,6 +74,13 @@ help_print() {
         debug_status="ENABLED"
     fi
 
+    # See if valgrind is enabled or not.
+    if [ $valgrind = "0" ]; then
+        valgrind_status="DISABLED"
+    else
+        valgrind_status="ENABLED"
+    fi
+
     # See if clean is enabled or not.
     if [ $clean = "0" ]; then
         clean_status="DISABLED"
@@ -146,6 +154,9 @@ Options:
                           libraries.
                           Current status: $debug_status
 
+ -v, --valgrind           Build with `--enable-check-with-valgrind'.
+                          Current status: $valgrind_status
+
  -j, --jobs INT           Number of threads to use in 'make'.
                           Current value: $jobs
 
@@ -218,6 +229,10 @@ do
             debug=1
             shift # past argument
             ;;
+        -v|--valgrind)
+            valgrind=1
+            shift # past argument
+            ;;
         -j|--jobs)
             jobs="$2"
             if [ x"jobs" = x ]; then
@@ -397,11 +412,17 @@ cd $build_dir
 # (in 'configure.ac'), we have set optimization flags which have to be
 # cancelled in debugging.
 if [ ! -f Makefile ]; then
+
+    # Set the proper flags.
     if [ x$debug = x1 ]; then
-        $srcdir/configure --srcdir=$srcdir --enable-debug --disable-shared
-    else
-        $srcdir/configure --srcdir=$srcdir
+        confopts="--enable-debug --disable-shared"
     fi
+    if [ x$valgrind = x1 ]; then
+        confopts="--enable-check-with-valgrind --disable-shared"
+    fi
+
+    # Run the configure script.
+    $srcdir/configure --srcdir=$srcdir $confopts
 fi
 
 
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 29a7821..b60bbd6 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -5755,6 +5755,9 @@ program using the GNU build system (through the configure 
script).
 @vtable @option
 
 @item --enable-debug
address@hidden Valgrind
address@hidden Debugging
address@hidden GNU Debugger
 Compile/build Gnuastro with debugging information and no optimization. In
 order to allow more efficient programs when using Gnuastro (after the
 installation), by default Gnuastro is built with a 3rd level (a very high
@@ -5764,6 +5767,22 @@ can greatly help in localizing the problem. This 
configuration option is
 identical to manually calling the configuration script with
 @code{CFLAGS="-g -O0"}.
 
address@hidden --enable-check-with-valgrind
address@hidden Valgrind
+Do the @command{make check} tests through Valgrind. Therefore, if any
+crashes or memory-related issues (segmentation faults in particular) occur
+in the tests, the output of Valgrind will also be put in the
address@hidden/test-suite.log} file without having to manually modify the
+check scripts. This option will also build Gnuastro with no optimization
+and enable debugging flags (as if you also call @option{--enable-debug}).
+
+Valgrind is free software. It is a program for easy checking of
+memory-related issues in programs. It runs a program within its own
+controlled environment and can thus identify the exact line-number in the
+program's source where a memory-related issue occurs. However, it can
+significantly slow-down the tests. So this option is only useful when a
+segmentation fault is found during @command{make check}.
+
 @item --enable-progname
 Only build and install @file{progname} along with any other program that is
 enabled in this fashion. @file{progname} is the name of the executable
@@ -6449,6 +6468,13 @@ also be significantly speed up the build (at the cost of 
slower built
 programs). So when you are testing something small or working on the build
 system itself, it will be much faster to test your work with this option.
 
address@hidden -v
address@hidden --valgrind
address@hidden Valgrind
+Build all @command{make check} tests within Valgrind. For more, see the
+description of @option{--enable-check-with-valgrind} in @ref{Gnuastro
+configure options}.
+
 @item -j INT
 @itemx --jobs INT
 The maximum number of threads/jobs for Make to build at any moment. As the
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d298d56..42e913c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -42,6 +42,9 @@
 ## .log file is created. The check if the input for a test exists or not
 ## should be checked in the test that depends on it, it can't be done here
 ## in the Makefile.
+if COND_CHECK_WITH_VALGRIND
+  MAYBE_CHECK_WITH_PROGRAM = "valgrind"
+endif
 if COND_HASGHOSTSCRIPT
   MAYBE_HASGHOSTSCRIPT = "yes"
 endif
@@ -194,13 +197,14 @@ endif
 
 
 # Environment variables for the test scripts.
-AM_TESTS_ENVIRONMENT =                              \
-export mkdir_p="$(MKDIR_P)";                        \
-export topsrc=$(top_srcdir);                        \
-export topbuild=$(top_builddir);                    \
-export haslibjpeg=$(MAYBE_HASLIBJPEG);              \
-export hasgnulibtool=$(MAYBE_HASGNULIBTOOL);        \
-export hasghostscript=$(MAYBE_HASGHOSTSCRIPT);
+AM_TESTS_ENVIRONMENT =                                   \
+export mkdir_p="$(MKDIR_P)";                             \
+export topsrc=$(top_srcdir);                             \
+export topbuild=$(top_builddir);                         \
+export haslibjpeg=$(MAYBE_HASLIBJPEG);                   \
+export hasgnulibtool=$(MAYBE_HASGNULIBTOOL);             \
+export hasghostscript=$(MAYBE_HASGHOSTSCRIPT);           \
+export check_with_program=$(MAYBE_CHECK_WITH_PROGRAM);
 
 
 
diff --git a/tests/arithmetic/connected-components.sh 
b/tests/arithmetic/connected-components.sh
index dfdf058..442f4bb 100755
--- a/tests/arithmetic/connected-components.sh
+++ b/tests/arithmetic/connected-components.sh
@@ -49,5 +49,9 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img 2 connected-components -hDETECTIONS   \
-          --output=connected-components.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img 2 connected-components -hDETECTIONS   \
+                              --output=connected-components.fits
diff --git a/tests/arithmetic/onlynumbers.sh b/tests/arithmetic/onlynumbers.sh
index 2a99de9..db4bdf0 100755
--- a/tests/arithmetic/onlynumbers.sh
+++ b/tests/arithmetic/onlynumbers.sh
@@ -44,4 +44,8 @@ if [ ! -f $execname ]; then echo "$execname not created."; 
exit 77; fi
 
 # Actual test script
 # ==================
-$execname -1 3.45 x
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname -1 3.45 x
diff --git a/tests/arithmetic/or.sh b/tests/arithmetic/or.sh
index 9437258..a24fc67 100755
--- a/tests/arithmetic/or.sh
+++ b/tests/arithmetic/or.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img 1 eq $img 3 eq or -gOBJECTS --output=or.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img 1 eq $img 3 eq or -gOBJECTS --output=or.fits
diff --git a/tests/arithmetic/snimage.sh b/tests/arithmetic/snimage.sh
index 37dcb2d..4be0b94 100755
--- a/tests/arithmetic/snimage.sh
+++ b/tests/arithmetic/snimage.sh
@@ -51,5 +51,9 @@ if [ ! -f $imgnc    ]; then echo "$imgnc does not exist."; 
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $imgin $imgnc - $imgnc / --hdu=1 --hdu=SKY --hdu=SKY_STD  \
-          --output=snimage.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $imgin $imgnc - $imgnc / --hdu=1 --hdu=SKY  \
+                               --hdu=SKY_STD  --output=snimage.fits
diff --git a/tests/arithmetic/where.sh b/tests/arithmetic/where.sh
index a8948b0..4e52514 100755
--- a/tests/arithmetic/where.sh
+++ b/tests/arithmetic/where.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img $img 0 eq nan where -h1 -h2 --output=where.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img $img 0 eq nan where -h1 -h2 
--output=where.fits
diff --git a/tests/buildprog/simpleio.sh b/tests/buildprog/simpleio.sh
index d76baa0..69baaf8 100755
--- a/tests/buildprog/simpleio.sh
+++ b/tests/buildprog/simpleio.sh
@@ -65,4 +65,9 @@ fi
 #
 # Except for `gnuastro/config.h', all headers are installed in
 # `$topsrc/lib' and `gnuastro/config.h' is in "../lib/"
-$execname $source $img 1 --la=../lib/libgnuastro.la -I$topsrc/lib -I../lib/
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $source $img 1 --la=../lib/libgnuastro.la \
+                              -I$topsrc/lib -I../lib/
diff --git a/tests/convertt/blankch.sh b/tests/convertt/blankch.sh
index 0cbf207..c0af7a8 100755
--- a/tests/convertt/blankch.sh
+++ b/tests/convertt/blankch.sh
@@ -53,4 +53,8 @@ if [ "x$haslibjpeg" != "xyes" ];then echo "libjpeg not 
present.";  exit 77;fi
 
 # Actual test script
 # ==================
-$execname blank $img blank --output=blankch.jpg
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname blank $img blank --output=blankch.jpg
diff --git a/tests/convertt/fitstojpeg.sh b/tests/convertt/fitstojpeg.sh
index 1c17884..8e6bab2 100755
--- a/tests/convertt/fitstojpeg.sh
+++ b/tests/convertt/fitstojpeg.sh
@@ -53,4 +53,8 @@ if [ "x$haslibjpeg" != "xyes" ];then echo "libjpeg not 
present.";  exit 77;fi
 
 # Actual test script
 # ==================
-$execname $img --invert --output=jpg
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --invert --output=jpg
diff --git a/tests/convertt/fitstojpegcmyk.sh b/tests/convertt/fitstojpegcmyk.sh
index 89c7d2a..79b77ce 100755
--- a/tests/convertt/fitstojpegcmyk.sh
+++ b/tests/convertt/fitstojpegcmyk.sh
@@ -52,4 +52,8 @@ if [ "x$haslibjpeg" != "xyes" ];then echo "libjpeg not 
present.";  exit 77;fi
 
 # Actual test script
 # ==================
-$execname blank blank blank $img --output=f2jcmyk.jpg
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname blank blank blank $img --output=f2jcmyk.jpg
diff --git a/tests/convertt/fitstopdf.sh b/tests/convertt/fitstopdf.sh
index 15bd654..9c6e6da 100755
--- a/tests/convertt/fitstopdf.sh
+++ b/tests/convertt/fitstopdf.sh
@@ -55,4 +55,8 @@ fi
 
 # Actual test script
 # ==================
-$execname $img --output=pdf --invert
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --output=pdf --invert
diff --git a/tests/convertt/fitstotxt.sh b/tests/convertt/fitstotxt.sh
index 595a223..7deee8f 100755
--- a/tests/convertt/fitstotxt.sh
+++ b/tests/convertt/fitstotxt.sh
@@ -47,4 +47,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --output=psf.txt
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --output=psf.txt
diff --git a/tests/convertt/jpegtofits.sh b/tests/convertt/jpegtofits.sh
index ea6c028..d1b0e9a 100755
--- a/tests/convertt/jpegtofits.sh
+++ b/tests/convertt/jpegtofits.sh
@@ -53,4 +53,8 @@ if [ "x$haslibjpeg" != "xyes" ];then echo "libjpeg not 
present.";  exit 77;fi
 
 # Actual test script
 # ==================
-$execname $img --output=fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --output=fits
diff --git a/tests/convertt/jpegtotxt.sh b/tests/convertt/jpegtotxt.sh
index 9cc8712..55a4f68 100755
--- a/tests/convertt/jpegtotxt.sh
+++ b/tests/convertt/jpegtotxt.sh
@@ -53,4 +53,8 @@ if [ "x$haslibjpeg" != "xyes" ];then echo "libjpeg not 
present.";  exit 77;fi
 
 # Actual test script
 # ==================
-$execname $img --output=jpegtotxt.txt
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --output=jpegtotxt.txt
diff --git a/tests/convolve/frequency.sh b/tests/convolve/frequency.sh
index da84ec2..80690fe 100755
--- a/tests/convolve/frequency.sh
+++ b/tests/convolve/frequency.sh
@@ -50,4 +50,9 @@ if [ ! -f $psf      ]; then echo "$psf does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --kernel=$psf --domain=frequency 
--output=convolve_frequency.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --kernel=$psf --domain=frequency \
+                              --output=convolve_frequency.fits
diff --git a/tests/convolve/spatial.sh b/tests/convolve/spatial.sh
index 344a870..4cf96c9 100755
--- a/tests/convolve/spatial.sh
+++ b/tests/convolve/spatial.sh
@@ -50,4 +50,9 @@ if [ ! -f $psf      ]; then echo "$psf does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --kernel=$psf --domain=spatial --output=convolve_spatial.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --kernel=$psf --domain=spatial   \
+                              --output=convolve_spatial.fits
diff --git a/tests/cosmiccal/simpletest.sh b/tests/cosmiccal/simpletest.sh
index 08bce79..123fd1c 100755
--- a/tests/cosmiccal/simpletest.sh
+++ b/tests/cosmiccal/simpletest.sh
@@ -44,4 +44,8 @@ if [ ! -f $execname ]; then echo "$execname not created.";    
exit 77; fi
 
 # Actual test script
 # ==================
-$execname --redshift=2.5
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname --redshift=2.5
diff --git a/tests/crop/imgcat.sh b/tests/crop/imgcat.sh
index 9693a79..7a865c8 100755
--- a/tests/crop/imgcat.sh
+++ b/tests/crop/imgcat.sh
@@ -53,7 +53,12 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 # The number of threads is one so if CFITSIO does is not configured to
 # enable multithreaded access to files, the tests pass. It is the
 # users choice to enable this feature.
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
 cat=$topsrc/tests/$prog/cat.txt
-$execname $img --catalog=$cat --suffix=_imgcat.fits --numthreads=1      \
-          --zeroisnotblank --coordcol=X_CENTER --coordcol=Y_CENTER      \
-          --namecol=NAME --mode=img --width=201
+$check_with_program $execname $img --catalog=$cat --suffix=_imgcat.fits    \
+                              --numthreads=1 --zeroisnotblank --mode=img   \
+                              --coordcol=X_CENTER --coordcol=Y_CENTER      \
+                              --namecol=NAME  --width=201
diff --git a/tests/crop/imgcenter.sh b/tests/crop/imgcenter.sh
index 03960ef..2aa3753 100755
--- a/tests/crop/imgcenter.sh
+++ b/tests/crop/imgcenter.sh
@@ -53,5 +53,9 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 # The number of threads is one so if CFITSIO does is not configured to
 # enable multithreaded access to files, the tests pass. It is the
 # users choice to enable this feature.
-$execname $img --center=251,251 --output=crop_imgcenter.fits    \
-          --numthreads=1 --mode=img --width=201
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --center=251,251 --mode=img --width=201 \
+                              --output=crop_imgcenter.fits --numthreads=1
diff --git a/tests/crop/imgcenternoblank.sh b/tests/crop/imgcenternoblank.sh
index cc52403..7d6f3f6 100755
--- a/tests/crop/imgcenternoblank.sh
+++ b/tests/crop/imgcenternoblank.sh
@@ -54,5 +54,10 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 # The number of threads is one so if CFITSIO does is not configured to
 # enable multithreaded access to files, the tests pass. It is the
 # users choice to enable this feature.
-$execname $img --center=500,500 --noblank --numthreads=1              \
-          --output=crop_imgcenternoblank.fits --mode=img --width=201
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --center=500,500 --noblank --numthreads=1 \
+                              --output=crop_imgcenternoblank.fits --mode=img \
+                              --width=201
diff --git a/tests/crop/imgoutpolygon.sh b/tests/crop/imgoutpolygon.sh
index d742644..36dea9f 100755
--- a/tests/crop/imgoutpolygon.sh
+++ b/tests/crop/imgoutpolygon.sh
@@ -53,6 +53,10 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 # The number of threads is one so if CFITSIO does is not configured to
 # enable multithreaded access to files, the tests pass. It is the
 # users choice to enable this feature.
-$execname $img $cat --mode=img --zeroisnotblank --outpolygon                  \
-          --polygon=209,50:436.76,151:475.64,438.2:210.6,454.04:121.4,289.88  \
-          --output=imgoutpolygon.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img $cat --mode=img --zeroisnotblank     \
+                              --outpolygon --output=imgoutpolygon.fits  \
+                              
--polygon=209,50:436.76,151:475.64,438.2:210.6,454.04:121.4,289.88
diff --git a/tests/crop/imgpolygon.sh b/tests/crop/imgpolygon.sh
index f3ae21b..e2a0241 100755
--- a/tests/crop/imgpolygon.sh
+++ b/tests/crop/imgpolygon.sh
@@ -49,5 +49,10 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img $cat --mode=img --zeroisnotblank --output=imgpolygon.fits      \
-          --polygon=209,50:436.76,151:475.64,438.2:210.6,454.04:121.4,289.88
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img $cat --mode=img --zeroisnotblank \
+                              --output=imgpolygon.fits              \
+                              
--polygon=209,50:436.76,151:475.64,438.2:210.6,454.04:121.4,289.88
diff --git a/tests/crop/section.sh b/tests/crop/section.sh
index 7d0704d..69b22f5 100755
--- a/tests/crop/section.sh
+++ b/tests/crop/section.sh
@@ -52,5 +52,9 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 # The number of threads is one so if CFITSIO does is not configured to
 # enable multithreaded access to files, the tests pass. It is the
 # users choice to enable this feature.
-$execname $img --section=-10:*+10,:250 --output=crop_section.fits \
-          --numthreads=1 --mode=img
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --section=-10:*+10,:250 --mode=img    \
+                              --output=crop_section.fits --numthreads=1
diff --git a/tests/crop/wcscat.sh b/tests/crop/wcscat.sh
index ac82a89..3a56af6 100755
--- a/tests/crop/wcscat.sh
+++ b/tests/crop/wcscat.sh
@@ -54,7 +54,12 @@ done
 # The number of threads is one so if CFITSIO does is not configured to
 # enable multithreaded access to files, the tests pass. It is the
 # users choice to enable this feature.
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
 cat=$topsrc/tests/$prog/cat.txt
-$execname $img --catalog=$cat --suffix=_wcscat.fits            \
-          --zeroisnotblank --coordcol=4 --coordcol=DEC_CENTER  \
-          --numthreads=1 --mode=wcs --width=3/3600
+$check_with_program $execname $img --catalog=$cat --suffix=_wcscat.fits  \
+                              --zeroisnotblank --coordcol=4 --mode=wcs   \
+                              --coordcol=DEC_CENTER --numthreads=1       \
+                              --width=3/3600
diff --git a/tests/crop/wcscenter.sh b/tests/crop/wcscenter.sh
index c174aad..51673a0 100755
--- a/tests/crop/wcscenter.sh
+++ b/tests/crop/wcscenter.sh
@@ -49,5 +49,10 @@ done
 
 # Actual test script
 # ==================
-$execname $img --center=0.99917157,1.0008283 --output=crop_wcscenter.fits \
-          --mode=wcs --width=0.3/3600
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --center=0.99917157,1.0008283       \
+                              --output=crop_wcscenter.fits --mode=wcs  \
+                              --width=0.3/3600
diff --git a/tests/crop/wcspolygon.sh b/tests/crop/wcspolygon.sh
index 692a447..6d6f9db 100755
--- a/tests/crop/wcspolygon.sh
+++ b/tests/crop/wcspolygon.sh
@@ -50,5 +50,10 @@ done
 
 # Actual test script
 # ==================
-$execname $img --mode=wcs --zeroisnotblank --output=wcspolygon.fits         \
-        --polygon=0.99980497,1.0001967:0.998378,1.0012267:0.9999766,1.0013217
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --mode=wcs --zeroisnotblank   \
+                              --output=wcspolygon.fits           \
+                              
--polygon=0.99980497,1.0001967:0.998378,1.0012267:0.9999766,1.0013217
diff --git a/tests/fits/copyhdu.sh b/tests/fits/copyhdu.sh
index 95edc6f..15c6d8a 100755
--- a/tests/fits/copyhdu.sh
+++ b/tests/fits/copyhdu.sh
@@ -51,4 +51,8 @@ if [ ! -f $img2     ]; then echo "$img2 does not exist.";  
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img2 --copy="Mock profiles" --output=$img1
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img2 --copy="Mock profiles" --output=$img1
diff --git a/tests/fits/delete.sh b/tests/fits/delete.sh
index 554debb..583c67a 100755
--- a/tests/fits/delete.sh
+++ b/tests/fits/delete.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --delete=ABSJUNK --delete=ABSJNK2
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --delete=ABSJUNK --delete=ABSJNK2
diff --git a/tests/fits/print.sh b/tests/fits/print.sh
index 7ea8d8a..c191393 100755
--- a/tests/fits/print.sh
+++ b/tests/fits/print.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img
diff --git a/tests/fits/update.sh b/tests/fits/update.sh
index c4419bc..f89e0db 100755
--- a/tests/fits/update.sh
+++ b/tests/fits/update.sh
@@ -49,5 +49,9 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --update=ABSJUNK,8.231,"An updated value.",s \
-          --update=ABSJNK2,1232,"Another updated value",kg
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --update=ABSJUNK,8.231,"An updated 
value.",s \
+                              --update=ABSJNK2,1232,"Another updated value",kg
diff --git a/tests/fits/write.sh b/tests/fits/write.sh
index 27e490a..4ba5bf4 100755
--- a/tests/fits/write.sh
+++ b/tests/fits/write.sh
@@ -49,6 +49,12 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
 cp $img fitstest.fits
-$execname fitstest.fits --write=ABSJUNK,10.92,"A Fits keyword Test.",m/s \
-          --date --write=ABSJNK2,2343fdsa,"Another absolute junk test!"
+$check_with_program $execname fitstest.fits                                    
\
+                              --write=ABSJUNK,10.92,"A Fits keyword Test.",m/s 
\
+                              --date                                           
\
+                              --write=ABSJNK2,2343fdsa,"Another absolute junk 
test!"
diff --git a/tests/lib/multithread.sh b/tests/lib/multithread.sh
index 4e60f05..b9953ca 100755
--- a/tests/lib/multithread.sh
+++ b/tests/lib/multithread.sh
@@ -48,4 +48,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi;
 
 # Actual test script
 # ==================
-$execname
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname
diff --git a/tests/lib/versioncxx.sh b/tests/lib/versioncxx.sh
index 51cf328..c52e9e2 100755
--- a/tests/lib/versioncxx.sh
+++ b/tests/lib/versioncxx.sh
@@ -44,4 +44,8 @@ fi;
 
 # Actual test script
 # ==================
-$execname
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname
diff --git a/tests/match/merged-cols.sh b/tests/match/merged-cols.sh
index 3cc7245..3e4ac2a 100755
--- a/tests/match/merged-cols.sh
+++ b/tests/match/merged-cols.sh
@@ -49,5 +49,10 @@ if [ ! -f $execname ]; then echo "$execname not created."; 
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat1 $cat2 --aperture=0.5 -omatch-merged-cols.txt \
-          --outcols=a1,aEFGH,bACCU1,aIJKL,bACCU2
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat1 $cat2 --aperture=0.5             \
+                              -omatch-merged-cols.txt                \
+                              --outcols=a1,aEFGH,bACCU1,aIJKL,bACCU2
diff --git a/tests/match/positions.sh b/tests/match/positions.sh
index a620873..2622750 100755
--- a/tests/match/positions.sh
+++ b/tests/match/positions.sh
@@ -49,4 +49,9 @@ if [ ! -f $execname ]; then echo "$execname not created."; 
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat1 $cat2 --aperture=0.5 --log --output=match-positions.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat1 $cat2 --aperture=0.5 --log    \
+                              --output=match-positions.fits
diff --git a/tests/mkcatalog/aperturephot.sh b/tests/mkcatalog/aperturephot.sh
index c331029..760cd7a 100755
--- a/tests/mkcatalog/aperturephot.sh
+++ b/tests/mkcatalog/aperturephot.sh
@@ -51,6 +51,10 @@ if [ ! -f $objimg   ]; then echo "$objimg does not exist";  
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $objimg --hdu=1 --valuesfile=$img             \
-          --output=aperturephot.fits                    \
-          --objid --x --y --ra --dec --magnitude --sn
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $objimg --hdu=1 --valuesfile=$img       \
+                              --output=aperturephot.fits              \
+                              --objid --x --y --ra --dec --magnitude --sn
diff --git a/tests/mkcatalog/detections.sh b/tests/mkcatalog/detections.sh
index 5077dee..e6b42b5 100755
--- a/tests/mkcatalog/detections.sh
+++ b/tests/mkcatalog/detections.sh
@@ -51,5 +51,10 @@ if [ ! -f $base     ]; then echo "$base does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $labels -h1 --valuesfile=$base --tableformat=txt            \
-          --output=detections.txt --x --y --ra --dec --magnitude --sn
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $labels -h1 --valuesfile=$base            \
+                              --tableformat=txt --output=detections.txt \
+                              --x --y --ra --dec --magnitude --sn
diff --git a/tests/mkcatalog/objects-clumps.sh 
b/tests/mkcatalog/objects-clumps.sh
index 987d5e7..1cbd776 100755
--- a/tests/mkcatalog/objects-clumps.sh
+++ b/tests/mkcatalog/objects-clumps.sh
@@ -49,5 +49,10 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --x --y --ra --dec --magnitude --upperlimitmag --sn  \
-          --tableformat=txt --clumpscat --output=objects-clumps.txt
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --x --y --ra --dec --magnitude     \
+                              --upperlimitmag --sn --tableformat=txt  \
+                              --clumpscat --output=objects-clumps.txt
diff --git a/tests/mknoise/addnoise.sh b/tests/mknoise/addnoise.sh
index 2720182..206f5b1 100755
--- a/tests/mknoise/addnoise.sh
+++ b/tests/mknoise/addnoise.sh
@@ -56,7 +56,11 @@ if [ ! -f $img2     ]; then echo "$img2 does not exist.";    
exit 77; fi
 
 # Actual test script
 # ==================
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
 export GSL_RNG_SEED=1
 export GSL_RNG_TYPE=ranlxs2
-$execname --envseed $img1
-$execname --envseed $img2
+$check_with_program $execname --envseed $img1
+$check_with_program $execname --envseed $img2
diff --git a/tests/mkprof/clearcanvas.sh b/tests/mkprof/clearcanvas.sh
index 99fb94e..fc50418 100755
--- a/tests/mkprof/clearcanvas.sh
+++ b/tests/mkprof/clearcanvas.sh
@@ -53,5 +53,10 @@ if [ ! -f $cat      ]; then echo "$cat does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --background=$img --mforflatpix --clearcanvas  \
-          --type=int32 --output="clearcanvas.fits"
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --background=$img --mforflatpix \
+                              --clearcanvas --type=int32           \
+                              --output="clearcanvas.fits"
diff --git a/tests/mkprof/ellipticalmasks.sh b/tests/mkprof/ellipticalmasks.sh
index 1423d7f..25b1167 100755
--- a/tests/mkprof/ellipticalmasks.sh
+++ b/tests/mkprof/ellipticalmasks.sh
@@ -53,5 +53,9 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --background=$img --mforflatpix --replace --oversample=1 \
-          --output="ellipticalmasks.fits"
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --background=$img --mforflatpix --replace \
+                              --oversample=1 --output="ellipticalmasks.fits"
diff --git a/tests/mkprof/mosaic1.sh b/tests/mkprof/mosaic1.sh
index c51fbe7..10eafa6 100755
--- a/tests/mkprof/mosaic1.sh
+++ b/tests/mkprof/mosaic1.sh
@@ -50,4 +50,9 @@ if [ ! -f $cat      ]; then echo "$cat does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --naxis=100,100 && mv 0_mkprofcat1.fits psf.fits
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --naxis=100,100 && mv 0_mkprofcat1.fits \
+                              psf.fits
diff --git a/tests/mkprof/mosaic2.sh b/tests/mkprof/mosaic2.sh
index c994bc3..7aa6b67 100755
--- a/tests/mkprof/mosaic2.sh
+++ b/tests/mkprof/mosaic2.sh
@@ -55,4 +55,8 @@ if [ ! -f $cat      ]; then echo "$cat does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --naxis=100,100 --crpix=-99,1 --individual
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --naxis=100,100 --crpix=-99,1 --individual
diff --git a/tests/mkprof/mosaic3.sh b/tests/mkprof/mosaic3.sh
index a2fa97e..7de1e43 100755
--- a/tests/mkprof/mosaic3.sh
+++ b/tests/mkprof/mosaic3.sh
@@ -52,4 +52,8 @@ if [ ! -f $cat      ]; then echo "$cat does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --naxis=100,100 --crpix=1,-99
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --naxis=100,100 --crpix=1,-99
diff --git a/tests/mkprof/mosaic4.sh b/tests/mkprof/mosaic4.sh
index 0218a39..64a4013 100755
--- a/tests/mkprof/mosaic4.sh
+++ b/tests/mkprof/mosaic4.sh
@@ -53,4 +53,8 @@ if [ ! -f $cat      ]; then echo "$cat does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --naxis=100,100 --crpix=-99,-99
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --naxis=100,100 --crpix=-99,-99
diff --git a/tests/mkprof/radeccat.sh b/tests/mkprof/radeccat.sh
index 801369f..83c17fe 100755
--- a/tests/mkprof/radeccat.sh
+++ b/tests/mkprof/radeccat.sh
@@ -48,4 +48,9 @@ if [ ! -f $cat      ]; then echo "$cat does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $cat --ccol=RA --ccol=Dec --mode=wcs --naxis=100,100
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $cat --ccol=RA --ccol=Dec --mode=wcs   \
+                              --naxis=100,100
diff --git a/tests/noisechisel/noisechisel.sh b/tests/noisechisel/noisechisel.sh
index d2bf1b2..81e8add 100755
--- a/tests/noisechisel/noisechisel.sh
+++ b/tests/noisechisel/noisechisel.sh
@@ -49,5 +49,10 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --tilesize=100,100 --snquant=0.999 --cleangrowndet   \
-          --checkdetection --continueaftercheck
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --tilesize=100,100 --snquant=0.999 \
+                              --cleangrowndet --checkdetection        \
+                              --continueaftercheck
diff --git a/tests/segment/segment.sh b/tests/segment/segment.sh
index 995dfa3..ad32674 100755
--- a/tests/segment/segment.sh
+++ b/tests/segment/segment.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --tilesize=100,100 --snquant=0.99
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --tilesize=100,100 --snquant=0.99
diff --git a/tests/statistics/basicstats.sh b/tests/statistics/basicstats.sh
index c850702..7bb6ba4 100755
--- a/tests/statistics/basicstats.sh
+++ b/tests/statistics/basicstats.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img -g9500 -l11000 --numasciibins=65
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img -g9500 -l11000 --numasciibins=65
diff --git a/tests/statistics/estimate_sky.sh b/tests/statistics/estimate_sky.sh
index 6e43a38..3735844 100755
--- a/tests/statistics/estimate_sky.sh
+++ b/tests/statistics/estimate_sky.sh
@@ -54,4 +54,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 # result will not be too accurate! Here we just want to see if the full
 # tessellation, estimation, interpolation and smoothing go nicely without
 # any errors.
-$execname $img --sky --checksky
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --sky --checksky
diff --git a/tests/table/fits-ascii-to-txt.sh b/tests/table/fits-ascii-to-txt.sh
index c86762e..e3f4393 100755
--- a/tests/table/fits-ascii-to-txt.sh
+++ b/tests/table/fits-ascii-to-txt.sh
@@ -49,4 +49,8 @@ if [ ! -f $table    ]; then echo "$table doesn't exist.";  
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $table --output=from-ascii-table.txt
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $table --output=from-ascii-table.txt
diff --git a/tests/table/fits-binary-to-txt.sh 
b/tests/table/fits-binary-to-txt.sh
index a98826e..8073b74 100755
--- a/tests/table/fits-binary-to-txt.sh
+++ b/tests/table/fits-binary-to-txt.sh
@@ -49,4 +49,8 @@ if [ ! -f $table    ]; then echo "$table doesn't exist.";  
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $table --output=from-binary-table.txt
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $table --output=from-binary-table.txt
diff --git a/tests/table/txt-to-fits-ascii.sh b/tests/table/txt-to-fits-ascii.sh
index 7f6eea0..e5edb5d 100755
--- a/tests/table/txt-to-fits-ascii.sh
+++ b/tests/table/txt-to-fits-ascii.sh
@@ -49,4 +49,9 @@ if [ ! -f $table    ]; then echo "$table doesn't exist.";  
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $table --output=ascii-table.fits --tableformat=fits-ascii
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $table --output=ascii-table.fits   \
+                              --tableformat=fits-ascii
diff --git a/tests/table/txt-to-fits-binary.sh 
b/tests/table/txt-to-fits-binary.sh
index 9649de7..02350f5 100755
--- a/tests/table/txt-to-fits-binary.sh
+++ b/tests/table/txt-to-fits-binary.sh
@@ -49,4 +49,9 @@ if [ ! -f $table    ]; then echo "$table does not exist."; 
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $table --output=binary-table.fits --tableformat=fits-binary
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $table --output=binary-table.fits \
+                              --tableformat=fits-binary
diff --git a/tests/warp/homographic.sh b/tests/warp/homographic.sh
index 58ac8c2..9d48afc 100755
--- a/tests/warp/homographic.sh
+++ b/tests/warp/homographic.sh
@@ -49,5 +49,9 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --output=homographic.fits \
-          --matrix="0.707106781,-0.707106781,0,  0.707106781, 0.707106781,0,  
0.001,0.002,1" --coveredfrac=0.5
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --output=homographic.fits --coveredfrac=0.5 
\
+                              --matrix="0.707106781,-0.707106781,0,  
0.707106781, 0.707106781,0,  0.001,0.002,1"
diff --git a/tests/warp/warp_scale.sh b/tests/warp/warp_scale.sh
index 8f91674..23537ad 100755
--- a/tests/warp/warp_scale.sh
+++ b/tests/warp/warp_scale.sh
@@ -49,4 +49,8 @@ if [ ! -f $img      ]; then echo "$img does not exist.";   
exit 77; fi
 
 # Actual test script
 # ==================
-$execname $img --scale=1/5 --centeroncorner
+#
+# `check_with_program' can be something like `Valgrind' or an empty
+# string. Such programs will execute the command if present and help in
+# debugging when the developer doesn't have access to the user's system.
+$check_with_program $execname $img --scale=1/5 --centeroncorner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]