next up previous contents
Next: Special Notes for Linux Up: Medial Axis Analysis of Previous: Compiling 3DMA

Testing the Compilation

 

	The directory med_ax/Examples contains a set of test runs that are
	used to test many (though not all) of the options in the 3dma code.
	Once you have built the 3dma executable, it may be tested by 
	following the instructions in the

		med_ax/Test/README

	This file is echo'ed verbatim below:

A)			Introduction

	The `Test' directory is provided for automatic testing of the 3DMA
	code and comparison against an established `Examples' directory.

	This directory should contain the files

	README makefile test_script

	and the subdirectories

	case1.5dfn.slc case1.5dfn.vol case1.5krig case1.5mh


	The directories  case1.5*  are included as they are the only
	test cases that contain subdirectories.

	You may use this Test directory (providing you have write privileges)
	or establish a copy of this Test directory anywhere in your disk space:

		% cd med_ax; tar cf - Test | (cd my_dir; tar xfBp -)

	will set this directory up in `my_dir'.




B)		Testing the 3dma executable - an example

	Suppose you wish to run all the case1.* test cases,
	on a silicon_graphics workstation (ie. your executable is `3dma_sgi'),
	and test the output against the archived set of cases in
	`/nfs/k/med_ax/Examples'.

			% cd my_dir/Test

		make two changes in the makefile:

			ARCH = sgi
			EXAMPLES = /nfs/k/med_ax/Examples

		(NOTE: EXAMPLES cannot be a relative address)

		and then run

			% make test_1


	`make test_1' will run the script  `test_script', creating
	subdirectories  Test/case1.*  (except for the Test/case1.5* ones
	which already exist).

	From each of the $EXAMPLES/case1.* directories it will copy the
	case1.*.com  and case1.*.in files into the respective Test/case1.*
	directories.

	Then in each Test/case1.* directory it will run the  case1.*.com
	file, performing all the test runs for that case.

	Finally it will differ each Test/case1.*/*  file with the
	corresponding $EXAMPLES/case1.*/* file and pipe the accumulated
	`diff' output into the file  Test/diffc.


	Thus when the `make test_1' finishes, a listing of the 'Test'
	directory will show:

% ls
case1.1         case1.5krig     case1.5         case1.8         makefile
case1.2         case1.5mh       case1.6         case1.9         test_log
case1.5dfn.slc  case1.4         case1.7         diffc           test_script
case1.5dfn.vol


	`more diffc'  will show all the differences between the
	Test/case1.* runs and the corresponding $EXAMPLES/case1.* runs.


	The file `test_log'  can be `more'd while  `make test_1' is
	running. It shows the current case being worked on.


	When you are done and wish to clean up,

		% make clean

	will restore the Test directory back to original state:

% make clean

rm -f case*/*/*
rm -f case*/*
rm -f test_log diffc
rmdir case1.[12346789]* case2.* case3.* case4.*
rmdir: case2.*: No such file or directory
rmdir: case3.*: No such file or directory
rmdir: case4.*: No such file or directory
make: [clean] Error 1 (ignored)

% ls
case1.5dfn.slc  case1.5dfn.vol  case1.5krig  case1.5mh  makefile  test_script



C)		Testing the 3dma executable - other examples

C1)	If you wish to test  cases  2.* and 4.* (for example) you can do

		% make test_2 test_4


C2)	If you wish to test all cases, do

		% make test_all


C3)	If you only wish to test a few cases, eg. case1.5krig, case2.2 and
	case4.10cp, forgo use of the `makefile' and run `test_script'
	directly.

	% cd Test
	% ./test_script sgi /nfs/k/med_ax/Examples 1.5krig 2.2 4.10cp

	will produce the directories

		Test/case2.2
		Test/case2.10cp

		(Test/case1.5krig is already there)

	it will copy the appropriate *.com and *.in files into these
	three directories,  run each test case, compare the output
	with that in /nfs/k/med_ax/Examples and store the differences
	in Test/diffc.

D)		Cleaning up

	When you are done,  

		% make clean

	cleans up.





Brent Lindquist
Thu Sep 30 12:33:54 EDT 1999