nightly_cio.sh 2.68 KB
#!/bin/sh -f
#
# For each incoming arg, generate file names by appending appropriate suffixes,
# use iclr to strip out garbage from the image file header, then use cmp to
# compare the resulting binary data.
#

    for fprefix do

	../../tools/iclr OutData/${fprefix}_cf_0.rgb
	../../tools/iclr OutData/${fprefix}_c_0.cov
	../../tools/iclr OutData/${fprefix}_c_0.z

	../../tools/iclr OutData/${fprefix}_iof_0.rgb
	../../tools/iclr OutData/${fprefix}_io_0.cov
	../../tools/iclr OutData/${fprefix}_io_0.z


#
# Compare RGB pixel values, rdp_c vs iosim.
#

	if cmp -s OutData/${fprefix}_cf_0.rgb OutData/${fprefix}_iof_0.rgb
	then
	    echo "INFO:  Image files ${fprefix}_cf_0.rgb and ${fprefix}_iof_0.rgb equate."
	else
	    echo "ERROR: Image files ${fprefix}_cf_0.rgb and ${fprefix}_iof_0.rgb differ."
	    idf OutData/${fprefix}_cf_0.rgb OutData/${fprefix}_iof_0.rgb OutData/${fprefix}_idf_c_io.rgb
	    echo "       difference file generated as ${fprefix}_idf_c_io.rgb"
	fi


#
# Compare z buffer values, rdp_c vs iosim.
#

	if cmp -s OutData/${fprefix}_c_0.z OutData/${fprefix}_io_0.z
	then
	    echo "INFO:  Image files ${fprefix}_c_0.z and ${fprefix}_io_0.z equate."
	else
	    echo "ERROR: Image files ${fprefix}_c_0.z and ${fprefix}_io_0.z differ."
	fi

#
# Compare filter program's coverage values, rdp_c vs iosim.
#

	if cmp -s OutData/${fprefix}_c_0.cov OutData/${fprefix}_io_0.cov
	then
	    echo "INFO:  Image files ${fprefix}_c_0.cov and ${fprefix}_io_0.cov equate."
	else
	    echo "ERROR: Image files ${fprefix}_c_0.cov and ${fprefix}_io_0.cov differ."
	fi

# Don't do this until raw coverage files compare (need to clear the header).
####
#### Compare raw coverage values, rdp_c vs rdp_cv.
####
###
###	if cmp -s OutData/${fprefix}_c_0.cvg OutData/${fprefix}_cv_0.cvg
###	then
###	    echo "INFO:  Coverage files ${fprefix}_c_0.cvg and ${fprefix}_cv_0.cvg equate."
###	else
###	    echo "ERROR: Coverage files ${fprefix}_c_0.cvg and ${fprefix}_cv_0.cvg differ."
###	fi
###
####
#### Compare raw coverage values, rdp_c vs iosim.
####
###
###	if cmp -s OutData/${fprefix}_c_0.cvg OutData/${fprefix}_io_0.cvg
###	then
###	    echo "INFO:  Coverage files ${fprefix}_c_0.cvg and ${fprefix}_io_0.cvg equate."
###	else
###	    echo "ERROR: Coverage files ${fprefix}_c_0.cvg and ${fprefix}_io_0.cvg differ."
###	fi
###
###
####
#### Compare raw coverage values, rdp_cv vs iosim.
####
###
###	if cmp -s OutData/${fprefix}_cv_0.cvg OutData/${fprefix}_io_0.cvg
###	then
###	    echo "INFO:  Coverage files ${fprefix}_cv_0.cvg and ${fprefix}_io_0.cvg equate."
###	else
###	    echo "ERROR: Coverage files ${fprefix}_cv_0.cvg and ${fprefix}_io_0.cvg differ."
###	fi

#
# Print a space between each prefix for readability.
#
	echo ""
    done