gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 6e9f760 1/2: tests/during-dev.sh allows checks


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 6e9f760 1/2: tests/during-dev.sh allows checks on BuildProgram natively
Date: Thu, 17 May 2018 20:11:19 -0400 (EDT)

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

    tests/during-dev.sh allows checks on BuildProgram natively
    
    Until now, the `tests/during-dev.sh' script would always assume that the
    top directory containing the program's configuration file is the source
    directory. However, some programs (currently only BuildProgram) build their
    configuration file during Gnuastro's build. With this commit, an `if'
    statement has been added to avoid having to manually edit those parts of
    this script any time we are testing such programs.
    
    In the same `if' statement, we now also add the extra `--la' option, so
    when testing with BuildProgram, it looks into the library built here, not
    the one installed on the system.
---
 tests/during-dev.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/during-dev.sh b/tests/during-dev.sh
index cedc98d..e7b9a8f 100755
--- a/tests/during-dev.sh
+++ b/tests/during-dev.sh
@@ -140,13 +140,22 @@ if make -j$numjobs -C "$builddir"; then
     # the last line in the configuration file doesn't actualy end with a
     # new line (in which case the appended string will be added to the end
     # of the last line).
-    cp "$srcdir/bin/gnuastro.conf" "$srcdir/bin/$utilname/ast$utilname.conf" \
-       .gnuastro/
+    if [ $utilname = buildprog ]; then
+        extraopts="--la=$builddir/lib/libgnuastro.la"
+        topconfdir="$builddir"
+    else
+        topconfdir="$srcdir"
+    fi
+    cp "$srcdir/bin/gnuastro.conf"                                    \
+       "$topconfdir/bin/$utilname/ast$utilname.conf" .gnuastro/
+
+    # Append `lastconfig' option to `gnuastro.conf', so the program doesn't
+    # go into the system headers.
     echo ""               >> .gnuastro/gnuastro.conf
     echo " lastconfig 1"  >> .gnuastro/gnuastro.conf
 
     # Run the built utility with the given arguments and options.
-    "$utility" $arguments $options
+    "$utility" $arguments $options $extraopts
 
     # Clean up.
     rm -rf .gnuastro



reply via email to

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