Revision: 76370
          http://sourceforge.net/p/brlcad/code/76370
Author:   starseeker
Date:     2020-07-17 18:23:05 +0000 (Fri, 17 Jul 2020)
Log Message:
-----------
Experiment with moving regression tests into subdirectories so we can keep the 
controlling logic more managable

Modified Paths:
--------------
    brlcad/branches/bioh/regress/CMakeLists.txt
    brlcad/branches/bioh/regress/library.sh

Added Paths:
-----------
    brlcad/branches/bioh/regress/asc/CMakeLists.txt
    brlcad/branches/bioh/regress/asc/asc.sh
    brlcad/branches/bioh/regress/asc/asc2dsp.sh

Removed Paths:
-------------
    brlcad/branches/bioh/regress/asc.sh
    brlcad/branches/bioh/regress/asc2dsp.sh

Modified: brlcad/branches/bioh/regress/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/regress/CMakeLists.txt 2020-07-17 18:12:24 UTC (rev 
76369)
+++ brlcad/branches/bioh/regress/CMakeLists.txt 2020-07-17 18:23:05 UTC (rev 
76370)
@@ -15,6 +15,9 @@
 set_target_properties(regress PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
 set_target_properties(regress PROPERTIES FOLDER "BRL-CAD Regression Tests")
 
+# ASC file Conversion Tests
+add_subdirectory(asc)
+
 # Image Conversion Regression Tests
 add_subdirectory(icv)
 
@@ -106,14 +109,8 @@
     add_test(NAME regress-dsp COMMAND ${SH_EXEC} 
"${CMAKE_SOURCE_DIR}/regress/dsp.sh" ${CMAKE_SOURCE_DIR})
     BRLCAD_REGRESSION_TEST(regress-dsp "mged;cv;asc2pix;rt;pix-bw" 
TEST_DEFINED)
 
-    add_test(NAME regress-asc COMMAND ${SH_EXEC} 
"${CMAKE_SOURCE_DIR}/regress/asc.sh" ${CMAKE_SOURCE_DIR})
-    BRLCAD_REGRESSION_TEST(regress-asc "asc2g;g2asc;gdiff;dbupgrade" 
TEST_DEFINED)
-
   endif (TARGET mged AND TARGET asc2g)
 
-  add_test(NAME regress-asc2dsp COMMAND ${SH_EXEC} 
"${CMAKE_SOURCE_DIR}/regress/asc2dsp.sh" ${CMAKE_SOURCE_DIR})
-  BRLCAD_REGRESSION_TEST(regress-asc2dsp "cv;asc2pix;pix-bw;asc2dsp" 
TEST_DEFINED)
-
   add_test(NAME regress-usage COMMAND ${SH_EXEC} 
"${CMAKE_SOURCE_DIR}/regress/usage.sh" ${CMAKE_SOURCE_DIR})
   BRLCAD_REGRESSION_TEST(regress-usage "rt" STAND_ALONE TEST_DEFINED)
 
@@ -124,9 +121,6 @@
 endif(SH_EXEC)
 
 CMAKEFILES(
-  asc.sh
-  asc/v4.g
-  asc2dsp.sh
   bots.sh
   comgeom.sh
   dsp.sh
@@ -203,10 +197,6 @@
 set(regress_outfiles
   .density
   .density.weight1
-  asc2dsp.log
-  asc2dsp.new.dsp
-  asc2dsp.old.bw
-  asc2dsp.old.dsp
   bots.diff.log
   bots.diff.pix
   bots.g
@@ -335,15 +325,6 @@
   mged.g
   mged.log
   asc.log
-  moss_v4.asc
-  moss_v4.g
-  moss_v4_asc_v4.g
-  moss_v4_asc_v4_v5.g
-  moss_v4_asc_v5.g
-  moss_v5.asc
-  moss_v5.g
-  moss_v5_basic.g
-  v4.asc
   moss.asc
   moss.g
   moss.log

Added: brlcad/branches/bioh/regress/asc/CMakeLists.txt
===================================================================
--- brlcad/branches/bioh/regress/asc/CMakeLists.txt                             
(rev 0)
+++ brlcad/branches/bioh/regress/asc/CMakeLists.txt     2020-07-17 18:23:05 UTC 
(rev 76370)
@@ -0,0 +1,49 @@
+if(SH_EXEC)
+
+  if (TARGET asc2g AND TARGET asc2g)
+
+    add_test(NAME regress-asc COMMAND ${SH_EXEC} 
"${CMAKE_CURRENT_SOURCE_DIR}/asc.sh" ${CMAKE_SOURCE_DIR})
+    BRLCAD_REGRESSION_TEST(regress-asc "asc2g;g2asc;gdiff;dbupgrade" 
TEST_DEFINED)
+
+  endif (TARGET asc2g AND TARGET asc2g)
+
+  add_test(NAME regress-asc2dsp COMMAND ${SH_EXEC} 
"${CMAKE_CURRENT_SOURCE_DIR}/asc2dsp.sh" ${CMAKE_SOURCE_DIR})
+  BRLCAD_REGRESSION_TEST(regress-asc2dsp "cv;asc2pix;pix-bw;asc2dsp" 
TEST_DEFINED)
+
+endif(SH_EXEC)
+
+CMAKEFILES(
+  asc.sh
+  v4.g
+  asc2dsp.sh
+  )
+
+# list of temporary files
+set(asc_outfiles
+  asc.log
+  asc2dsp.log
+  asc2dsp.new.dsp
+  asc2dsp.old.bw
+  asc2dsp.old.dsp
+  moss_v4.asc
+  moss_v4.g
+  moss_v4_asc_v4.g
+  moss_v4_asc_v4_v5.g
+  moss_v4_asc_v5.g
+  moss_v5.asc
+  moss_v5.g
+  moss_v5_basic.g
+  v4.asc
+  )
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES 
"${asc_outfiles}")
+DISTCLEAN(${asc_outfiles})
+
+CMAKEFILES(CMakeLists.txt)
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: brlcad/branches/bioh/regress/asc/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Copied: brlcad/branches/bioh/regress/asc/asc.sh (from rev 76369, 
brlcad/branches/bioh/regress/asc.sh)
===================================================================
--- brlcad/branches/bioh/regress/asc/asc.sh                             (rev 0)
+++ brlcad/branches/bioh/regress/asc/asc.sh     2020-07-17 18:23:05 UTC (rev 
76370)
@@ -0,0 +1,198 @@
+#!/bin/sh
+#                        A S C . S H
+# BRL-CAD
+#
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+
+# Ensure /bin/sh
+export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
+
+# source common library functionality, setting ARGS, NAME_OF_THIS,
+# PATH_TO_THIS, and THIS.
+. "$1/regress/library.sh"
+
+if test "x$LOGFILE" = "x" ; then
+    LOGFILE=`pwd`/asc.log
+    rm -f $LOGFILE
+fi
+log "=== TESTING asc format conversion ==="
+
+A2G="`ensearch asc2g`"
+if test ! -f "$A2G" ; then
+    log "Unable to find asc2g, aborting"
+    exit 1
+fi
+
+G2A="`ensearch g2asc`"
+if test ! -f "$G2A" ; then
+    log "Unable to find g2asc, aborting"
+    exit 1
+fi
+
+GD="`ensearch gdiff`"
+if test ! -f "$GD" ; then
+    log "Unable to find gdiff, aborting"
+    exit 1
+fi
+
+DU="`ensearch dbupgrade`"
+if test ! -f "$DU" ; then
+    log "Unable to find dbupgrade, aborting"
+    exit 1
+fi
+
+# Start by converting v4 moss.asc to a v5 .g file
+log "... convert asc file to v5 .g format"
+ASC1="$1/db/moss.asc"
+G1="moss_v5.g"
+rm -f $G1
+$A2G $ASC1 $G1 2>&1 > $LOGFILE
+
+# Next convert v5 .g file to a v5 asc file
+log "convert v5 .g file to v5 asc format"
+ASC2="moss_v5.asc"
+rm -f $ASC2
+log "$G2A $G1 $ASC2"
+$G2A $G1 $ASC2 2>&1 > $LOGFILE
+
+# convert v5 .g file to a v5 .g file
+log "convert v5 asc file to v5 .g format (simple round trip)"
+GRT="moss_v5_basic.g"
+rm -f $GRT
+log "$A2G $ASC2 $GRT"
+$A2G $ASC2 $GRT 2>&1 > $LOGFILE
+
+# the original v5 .g file and the round-tripped v5 .g file
+# should be identical (apparently except for the color table)
+log "$GD -v $G1 $GRT -F \"! -attr regionid_colortable\""
+$GD -v -F "! -attr regionid_colortable" $G1 $GRT 2>&1 > $LOGFILE
+STATUS=$?
+
+# If that didn't work, don't bother going further - we've got a problem.
+if [ $STATUS -gt 0 ] ; then
+    log "-> basic v5 asc.sh round-trip FAILED, see $LOGFILE"
+    exit $STATUS
+fi
+
+# If the basics work, check v4 and dbupgrade
+
+# Use the undocumented dbupgrade -r to downgrade v5 .g file to a v4 .g file.
+# Not something the user should be doing, hence it remaining deliberately
+# undocumented, but we need it here to get a binary v4 file for testing.
+# asc2g can't write out a v4 asc file from a v5 database, so there's no
+# other way to exercise that code path.
+log "convert v5 .g file to v4 .g format"
+G2="moss_v4.g"
+rm -f $G2
+log "$DU -r $G1 $G2"
+$DU -r $G1 $G2 2>&1 > $LOGFILE
+
+# convert v4 .g file to a v4 asc file
+log "convert v4 .g file to v4 asc format"
+ASC3="moss_v4.asc"
+rm -f $ASC3
+log "$G2A $G2 $ASC3"
+$G2A $G2 $ASC3 2>&1 > $LOGFILE
+
+# convert v4 asc to v5 .g file
+
+log "convert v4 asc file to v5 g format"
+G3="moss_v4_asc_v5.g"
+rm -f $G3
+log "$A2G $ASC3 $G3"
+$A2G $ASC3 $G3 2>&1 > $LOGFILE
+
+# Next, do the downgrade/upgrade cycle on the .g file to test dbupgrade's
+# behavior on a binary v4 .g.
+G4="moss_v4_asc_v4.g"
+G5="moss_v4_asc_v4_v5.g"
+rm -f $G4 $G5
+log "$DU -r $G3 $G4"
+$DU -r $G3 $G4 2>&1 > $LOGFILE
+log "$DU $G4 $G5"
+$DU $G4 $G5 2>&1 > $LOGFILE
+
+# Rather surprisingly, all.g doesn't pass this comparison... not sure
+# why yet...
+#
+#log "$GD -v -t 0.0001 -F \"! -attr regionid_colortable\" $G3 $G5"
+#$GD -v -t 0.0001 -F "! -attr regionid_colortable" $G3 $G5 2>&1 > $LOGFILE
+#STATUS=$?
+# binary dbupdate should't have significantly altered the file.
+#if [ $STATUS -gt 0 ] ; then
+#    log "-> dbupgrade cycle FAILED, see $LOGFILE"
+#    exit $STATUS
+#fi
+
+# After all that, the original v5 .g file and the file produced at the end of
+# all the processing should be identical
+#
+# (Well, unchanged sans a region color table, region_id=-1 on all.g and
+# numerical differences anyway... Accomidate data changes with gdiff
+# filtering.)
+log "$GD -v -t 0.0001 -F \"! -name _GLOBAL ! -attr region_id=-1\" $G1 $G5"
+$GD -v -t 0.0001 -F "! -name _GLOBAL ! -attr region_id=-1" $G1 $G5 2>&1 > 
$LOGFILE
+STATUS=$?
+
+if [ $STATUS -gt 0 ] ; then
+    log "-> asc.sh FAILED, see $LOGFILE"
+    exit $STATUS
+else
+    log "-> asc.sh succeeded"
+fi
+
+# Run a test database with better object coverage through g2asc.
+# Unfortunately, at the moment it looks like this won't round
+# trip.
+#
+G2ASC1="$1/regress/asc/v4.g"
+log "$G2A $G2ASC1 v4.asc"
+$G2A $G2ASC1 v4.asc 2>&1 > $LOGFILE
+STATUS=$?
+# If something went wrong, bail.
+if [ $STATUS -gt 0 ] ; then
+    log "-> g2asc broad object coverage check FAILED, see $LOGFILE"
+    exit $STATUS
+fi
+
+exit $STATUS
+
+# Local Variables:
+# mode: sh
+# tab-width: 8
+# sh-indentation: 4
+# sh-basic-offset: 4
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=4 tabstop=8

Copied: brlcad/branches/bioh/regress/asc/asc2dsp.sh (from rev 76369, 
brlcad/branches/bioh/regress/asc2dsp.sh)
===================================================================
--- brlcad/branches/bioh/regress/asc/asc2dsp.sh                         (rev 0)
+++ brlcad/branches/bioh/regress/asc/asc2dsp.sh 2020-07-17 18:23:05 UTC (rev 
76370)
@@ -0,0 +1,121 @@
+#!/bin/sh
+#                      A S C 2 D S P . S H
+# BRL-CAD
+#
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+
+# Ensure /bin/sh
+export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
+
+# source common library functionality, setting ARGS, NAME_OF_THIS,
+# PATH_TO_THIS, and THIS.
+. "$1/regress/library.sh"
+
+if test "x$LOGFILE" = "x" ; then
+    LOGFILE=`pwd`/asc2dsp.log
+    rm -f $LOGFILE
+fi
+log "=== TESTING asc2dsp ==="
+
+A2D="`ensearch asc2dsp`"
+if test ! -f "$A2D" ; then
+    log "Unable to find asc2dsp, aborting"
+    exit 1
+fi
+
+CV="`ensearch cv`"
+if test ! -f "$CV" ; then
+    log "Unable to find cv, aborting"
+    exit 1
+fi
+
+A2P="`ensearch asc2pix`"
+if test ! -f "$A2P" ; then
+    log "Unable to find asc2pix, aborting"
+    exit 1
+fi
+
+P2B="`ensearch pix-bw`"
+if test ! -f "$P2B" ; then
+    log "Unable to find pix-bw, aborting"
+    exit 1
+fi
+
+
+BASE1=asc2dsp.old
+BASE2=asc2dsp.new
+
+
+# we generate one dsp file the old way and one the new way--they should be 
identical
+# old first
+log "... convert dsp data file in asc hex format to pix format"
+ASC1="$1/regress/dsp/$BASE1.asc"
+rm -f $BASE1.pix
+$A2P < $ASC1 > $BASE1.pix 2>>$LOGFILE
+
+log "convert pix to bw format"
+rm -f $BASE1.bw
+# take the blue pixel only
+$P2B -B1.0 $BASE1.pix > $BASE1.bw 2>>$LOGFILE
+
+log "convert pix to dsp format"
+rm -f $BASE1.dsp
+run $CV huc nu16 $BASE1.bw $BASE1.dsp
+
+log "convert dsp data file in asc decimal format to dsp format"
+ASC2="$1/regress/dsp/$BASE2.asc"
+rm -f $BASE2.dsp
+run $A2D $BASE2.asc $BASE2.dsp
+
+# the two dsp files should be identical
+run cmp $BASE1.dsp $BASE2.dsp
+STATUS=$?
+
+
+if [ $STATUS -gt 0 ] ; then
+    log "-> asc2dsp.sh FAILED, see $LOGFILE"
+else
+    log "-> asc2dsp.sh succeeded"
+fi
+
+exit $STATUS
+
+# Local Variables:
+# mode: sh
+# tab-width: 8
+# sh-indentation: 4
+# sh-basic-offset: 4
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=4 tabstop=8

Deleted: brlcad/branches/bioh/regress/asc.sh
===================================================================
--- brlcad/branches/bioh/regress/asc.sh 2020-07-17 18:12:24 UTC (rev 76369)
+++ brlcad/branches/bioh/regress/asc.sh 2020-07-17 18:23:05 UTC (rev 76370)
@@ -1,198 +0,0 @@
-#!/bin/sh
-#                        A S C . S H
-# BRL-CAD
-#
-# Copyright (c) 2010-2020 United States Government as represented by
-# the U.S. Army Research Laboratory.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# 3. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-###
-
-# Ensure /bin/sh
-export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
-
-# source common library functionality, setting ARGS, NAME_OF_THIS,
-# PATH_TO_THIS, and THIS.
-. "$1/regress/library.sh"
-
-if test "x$LOGFILE" = "x" ; then
-    LOGFILE=`pwd`/asc.log
-    rm -f $LOGFILE
-fi
-log "=== TESTING asc format conversion ==="
-
-A2G="`ensearch asc2g`"
-if test ! -f "$A2G" ; then
-    log "Unable to find asc2g, aborting"
-    exit 1
-fi
-
-G2A="`ensearch g2asc`"
-if test ! -f "$G2A" ; then
-    log "Unable to find g2asc, aborting"
-    exit 1
-fi
-
-GD="`ensearch gdiff`"
-if test ! -f "$GD" ; then
-    log "Unable to find gdiff, aborting"
-    exit 1
-fi
-
-DU="`ensearch dbupgrade`"
-if test ! -f "$DU" ; then
-    log "Unable to find dbupgrade, aborting"
-    exit 1
-fi
-
-# Start by converting v4 moss.asc to a v5 .g file
-log "... convert asc file to v5 .g format"
-ASC1="$1/db/moss.asc"
-G1="moss_v5.g"
-rm -f $G1
-$A2G $ASC1 $G1 2>&1 > $LOGFILE
-
-# Next convert v5 .g file to a v5 asc file
-log "convert v5 .g file to v5 asc format"
-ASC2="moss_v5.asc"
-rm -f $ASC2
-log "$G2A $G1 $ASC2"
-$G2A $G1 $ASC2 2>&1 > $LOGFILE
-
-# convert v5 .g file to a v5 .g file
-log "convert v5 asc file to v5 .g format (simple round trip)"
-GRT="moss_v5_basic.g"
-rm -f $GRT
-log "$A2G $ASC2 $GRT"
-$A2G $ASC2 $GRT 2>&1 > $LOGFILE
-
-# the original v5 .g file and the round-tripped v5 .g file
-# should be identical (apparently except for the color table)
-log "$GD -v $G1 $GRT -F \"! -attr regionid_colortable\""
-$GD -v -F "! -attr regionid_colortable" $G1 $GRT 2>&1 > $LOGFILE
-STATUS=$?
-
-# If that didn't work, don't bother going further - we've got a problem.
-if [ $STATUS -gt 0 ] ; then
-    log "-> basic v5 asc.sh round-trip FAILED, see $LOGFILE"
-    exit $STATUS
-fi
-
-# If the basics work, check v4 and dbupgrade
-
-# Use the undocumented dbupgrade -r to downgrade v5 .g file to a v4 .g file.
-# Not something the user should be doing, hence it remaining deliberately
-# undocumented, but we need it here to get a binary v4 file for testing.
-# asc2g can't write out a v4 asc file from a v5 database, so there's no
-# other way to exercise that code path.
-log "convert v5 .g file to v4 .g format"
-G2="moss_v4.g"
-rm -f $G2
-log "$DU -r $G1 $G2"
-$DU -r $G1 $G2 2>&1 > $LOGFILE
-
-# convert v4 .g file to a v4 asc file
-log "convert v4 .g file to v4 asc format"
-ASC3="moss_v4.asc"
-rm -f $ASC3
-log "$G2A $G2 $ASC3"
-$G2A $G2 $ASC3 2>&1 > $LOGFILE
-
-# convert v4 asc to v5 .g file
-
-log "convert v4 asc file to v5 g format"
-G3="moss_v4_asc_v5.g"
-rm -f $G3
-log "$A2G $ASC3 $G3"
-$A2G $ASC3 $G3 2>&1 > $LOGFILE
-
-# Next, do the downgrade/upgrade cycle on the .g file to test dbupgrade's
-# behavior on a binary v4 .g.
-G4="moss_v4_asc_v4.g"
-G5="moss_v4_asc_v4_v5.g"
-rm -f $G4 $G5
-log "$DU -r $G3 $G4"
-$DU -r $G3 $G4 2>&1 > $LOGFILE
-log "$DU $G4 $G5"
-$DU $G4 $G5 2>&1 > $LOGFILE
-
-# Rather surprisingly, all.g doesn't pass this comparison... not sure
-# why yet...
-#
-#log "$GD -v -t 0.0001 -F \"! -attr regionid_colortable\" $G3 $G5"
-#$GD -v -t 0.0001 -F "! -attr regionid_colortable" $G3 $G5 2>&1 > $LOGFILE
-#STATUS=$?
-# binary dbupdate should't have significantly altered the file.
-#if [ $STATUS -gt 0 ] ; then
-#    log "-> dbupgrade cycle FAILED, see $LOGFILE"
-#    exit $STATUS
-#fi
-
-# After all that, the original v5 .g file and the file produced at the end of
-# all the processing should be identical
-#
-# (Well, unchanged sans a region color table, region_id=-1 on all.g and
-# numerical differences anyway... Accomidate data changes with gdiff
-# filtering.)
-log "$GD -v -t 0.0001 -F \"! -name _GLOBAL ! -attr region_id=-1\" $G1 $G5"
-$GD -v -t 0.0001 -F "! -name _GLOBAL ! -attr region_id=-1" $G1 $G5 2>&1 > 
$LOGFILE
-STATUS=$?
-
-if [ $STATUS -gt 0 ] ; then
-    log "-> asc.sh FAILED, see $LOGFILE"
-    exit $STATUS
-else
-    log "-> asc.sh succeeded"
-fi
-
-# Run a test database with better object coverage through g2asc.
-# Unfortunately, at the moment it looks like this won't round
-# trip.
-#
-G2ASC1="$1/regress/asc/v4.g"
-log "$G2A $G2ASC1 v4.asc"
-$G2A $G2ASC1 v4.asc 2>&1 > $LOGFILE
-STATUS=$?
-# If something went wrong, bail.
-if [ $STATUS -gt 0 ] ; then
-    log "-> g2asc broad object coverage check FAILED, see $LOGFILE"
-    exit $STATUS
-fi
-
-exit $STATUS
-
-# Local Variables:
-# mode: sh
-# tab-width: 8
-# sh-indentation: 4
-# sh-basic-offset: 4
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=4 tabstop=8

Deleted: brlcad/branches/bioh/regress/asc2dsp.sh
===================================================================
--- brlcad/branches/bioh/regress/asc2dsp.sh     2020-07-17 18:12:24 UTC (rev 
76369)
+++ brlcad/branches/bioh/regress/asc2dsp.sh     2020-07-17 18:23:05 UTC (rev 
76370)
@@ -1,121 +0,0 @@
-#!/bin/sh
-#                      A S C 2 D S P . S H
-# BRL-CAD
-#
-# Copyright (c) 2010-2020 United States Government as represented by
-# the U.S. Army Research Laboratory.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# 3. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-###
-
-# Ensure /bin/sh
-export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
-
-# source common library functionality, setting ARGS, NAME_OF_THIS,
-# PATH_TO_THIS, and THIS.
-. "$1/regress/library.sh"
-
-if test "x$LOGFILE" = "x" ; then
-    LOGFILE=`pwd`/asc2dsp.log
-    rm -f $LOGFILE
-fi
-log "=== TESTING asc2dsp ==="
-
-A2D="`ensearch asc2dsp`"
-if test ! -f "$A2D" ; then
-    log "Unable to find asc2dsp, aborting"
-    exit 1
-fi
-
-CV="`ensearch cv`"
-if test ! -f "$CV" ; then
-    log "Unable to find cv, aborting"
-    exit 1
-fi
-
-A2P="`ensearch asc2pix`"
-if test ! -f "$A2P" ; then
-    log "Unable to find asc2pix, aborting"
-    exit 1
-fi
-
-P2B="`ensearch pix-bw`"
-if test ! -f "$P2B" ; then
-    log "Unable to find pix-bw, aborting"
-    exit 1
-fi
-
-
-BASE1=asc2dsp.old
-BASE2=asc2dsp.new
-
-
-# we generate one dsp file the old way and one the new way--they should be 
identical
-# old first
-log "... convert dsp data file in asc hex format to pix format"
-ASC1="$1/regress/dsp/$BASE1.asc"
-rm -f $BASE1.pix
-$A2P < $ASC1 > $BASE1.pix 2>>$LOGFILE
-
-log "convert pix to bw format"
-rm -f $BASE1.bw
-# take the blue pixel only
-$P2B -B1.0 $BASE1.pix > $BASE1.bw 2>>$LOGFILE
-
-log "convert pix to dsp format"
-rm -f $BASE1.dsp
-run $CV huc nu16 $BASE1.bw $BASE1.dsp
-
-log "convert dsp data file in asc decimal format to dsp format"
-ASC2="$1/regress/dsp/$BASE2.asc"
-rm -f $BASE2.dsp
-run $A2D $BASE2.asc $BASE2.dsp
-
-# the two dsp files should be identical
-run cmp $BASE1.dsp $BASE2.dsp
-STATUS=$?
-
-
-if [ $STATUS -gt 0 ] ; then
-    log "-> asc2dsp.sh FAILED, see $LOGFILE"
-else
-    log "-> asc2dsp.sh succeeded"
-fi
-
-exit $STATUS
-
-# Local Variables:
-# mode: sh
-# tab-width: 8
-# sh-indentation: 4
-# sh-basic-offset: 4
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=4 tabstop=8

Modified: brlcad/branches/bioh/regress/library.sh
===================================================================
--- brlcad/branches/bioh/regress/library.sh     2020-07-17 18:12:24 UTC (rev 
76369)
+++ brlcad/branches/bioh/regress/library.sh     2020-07-17 18:23:05 UTC (rev 
76370)
@@ -44,10 +44,6 @@
 THIS="$PATH_TO_THIS/$NAME_OF_THIS"
 export ARGS ARG0 ARG1 NAME_OF_THIS PATH_TO_THIS THIS
 
-LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH
-DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH
-export LD_LIBRARY_PATH DYLD_LIBRARY_PATH
-
 is_absolute() {
     if test "x$1" = "x" ; then
        return
@@ -211,7 +207,7 @@
 # script's location
 ensearch ( ) {
     ensearch_file="$1"
-    ensearch_dirs="$ARG1/bin ../bin ./bin \"$PATH_TO_THIS/../bin\" ../bench 
\"$PATH_TO_THIS/../bench\" "
+    ensearch_dirs="$ARG1/bin ../bin ../../bin ./bin \"$PATH_TO_THIS/../bin\" 
../bench \"$PATH_TO_THIS/../bench\" "
 
     if test "x$ensearch_file" = "x" ; then
        # nothing to do

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to