head	1.3;
access;
symbols
	ansi-20040405-merged:1.2
	postmerge-20040405-ansi:1.2
	premerge-20040404-ansi:1.2
	postmerge-autoconf:1.2
	autoconf-freeze:1.2
	premerge-autoconf:1.2
	postmerge-20040315-windows:1.2
	premerge-20040315-windows:1.2
	windows-20040315-freeze:1.2
	autoconf-20031203:1.2
	autoconf-20031202:1.2
	autoconf-branch:1.2.0.12
	phong-branch:1.2.0.10
	photonmap-branch:1.2.0.8
	rel-6-1-DP:1.2
	windows-branch:1.2.0.6
	rel-6-0-2:1.2
	ansi-branch:1.2.0.4
	rel-6-0-1-branch:1.2.0.2
	hartley-6-0-post:1.2
	hartley-6-0-pre:1.2
	rel-6-0-1:1.2
	rel-6-0:1.2;
locks; strict;
comment	@# @;


1.3
date	2004.05.19.19.16.08;	author morrison;	state dead;
branches;
next	1.2;

1.2
date	2001.10.12.23.11.21;	author morrison;	state Exp;
branches;
next	1.1;

1.1
date	2001.10.04.18.26.18;	author morrison;	state Exp;
branches;
next	;


desc
@@


1.3
log
@The old regression test scripts are being replaced by something else.  Likely it'll be Corredor with some unit test framework.  The old scripts are so far out of sync and so inadequate that it's simply not worth it any more.
@
text
@#!/bin/sh
#
# s p d i
#
# This test generates a 5x5 specular and diffuse grid of sphere primitives.
# The resultings image that is raytraced gets compared against a reference
# image.
#
###
# Source function library
. `dirname $0`/library

NAME=SpecularDiffuse


start ( ) {

BIN=$BRLCAD_ROOT/bin
export BIN

rm -f spdi.g spdi.rt spdi.log spdi.pix

$BIN/mged -c spdi.g << EOF


set glob_compat_mode 0

in half.s half 0 0 1 -1
r half.r u half.s
mater half.r plastic 76 158 113 0
g all.g half.r

set radius 256
foreach p {1 2 3 4 5} { 

  set sh [expr \$p \* 4]
  set y  [expr [expr \$p - 3] \* 640]

  foreach v {1 2 3 4 5} {
    set sp [expr \$v \* 0.2]
    set di [expr 1.0 - \$sp]
    set x  [expr [expr \$v - 3] \* 640]

    in sph_\${sp}_\${sh}.s sph \$x \$y \$radius \$radius
    r  sph_\${sp}_\${sh}.r u sph_\${sp}_\${sh}.s
    mater sph_\${sp}_\${sh}.r "plastic {sp \$sp di \$di sh \$sh}" 100 200 200 0

    g all.g sph_\${sp}_\${sh}.r
  }
}

set glob_compat_mode 1

in light1.s ell -464 339 2213 0 100 0 0 0 100 100 0 0
r light1.r u light1.s
mater light1.r "light {invisible 1 angle 180 infinite 1}" 255 255 255 0
g all.g light1.r

Z
e all.g
press top
size 3200
saveview spdi.rt
q
EOF

mv spdi.rt spdi.orig
sed "s,^rt,$BIN/rt," < spdi.orig > spdi.rt
rm spdi.orig
chmod 775 spdi.rt
echo "rendering..."
./spdi.rt

}


status ( ) {
    if [ ! -f $REGRESS_DIR/spdi.rt ] || [ ! -f $REGRESS_DIR/spdi.g ] ; then
        warn "mged failed"
        return 1
    fi
    log "spdi OK"
    return 0
}

stop ( ) {
    log "stopping this damn bitch"
}

regress $1

exit $?
@


1.2
log
@*** empty log message ***
@
text
@@


1.1
log
@added new test scripts
@
text
@d3 1
a3 1
# This is the initial spdi test
d5 5
a9 1

d13 1
a13 17
initializeVariable PACKAGE_NAME brlcad
# if regress_dir was not set, default to the package that this script is included with
if [ "x$REGRESS_DIR" = "x" ] ; then
    if [ -d "$LPWD/../../$PACKAGE_NAME" ] ; then
        initializeVariable REGRESS_DIR "$LPWD/../.."
    elif [ -d "$LPWD/../$PACKAGE_NAME" ] ; then
        initializeVariable REGRESS_DIR "$LPWD/.."
    elif [ -d "$LPWD/$PACKAGE_NAME" ] ; then
        initializeVariable REGRESS_DIR "$LPWD"
    else
        bomb "Unable to locate $PACKAGE_NAME"
    fi
fi
__ARCH="$ARCH"
initializeVariable ARCH `${REGRESS_DIR}/brlcad/sh/machinetype.sh`
initializeVariable ARCH "$__ARCH"
initializeVariable BRLCAD_ROOT "${REGRESS_DIR}/${PACKAGE_NAME}.${ARCH}"
d21 1
a21 1
rm -f spdi.g spdi.log spdi spdi.pix
d63 1
a63 1
saveview spdi.view
d67 2
a68 2
mv spdi.view spdi.orig
sed "s,^rt,$BIN/rt," < spdi.orig > spdi.view
d70 1
a70 1
chmod 775 spdi.view
d72 1
a72 1
./spdi.view
a75 6
stop ( ) {
    bomb "stop unimplemented"
    killall build
    killall sh
    killall cake
}
d78 1
a78 1
    if [ ! -f $REGRESS_DIR/spdi.view ] || [ ! -f $REGRESS_DIR/spdi.g ] ; then
d86 3
d90 1
a90 18
case "$1" in
    start )
        start
        ;;
    stop )
        stop
        ;;
    restart )
        stop
        start
        ;;
    status )
        status
        ;;
    * )
        log "Usage: $0 {start|stop|restart|status}"
        exit 1
esac
@

