--- ray/makeall 2018/05/30 14:14:55 1.29 +++ ray/makeall 2020/09/11 20:38:46 1.30 @@ -1,5 +1,5 @@ #!/bin/csh -f -# RCSid $Id: makeall,v 1.29 2018/05/30 14:14:55 greg Exp $ +# RCSid $Id: makeall,v 1.30 2020/09/11 20:38:46 greg Exp $ # # Make all the Radiance programs # @@ -7,6 +7,7 @@ if ( $#argv < 1 ) then echo "Usage: makeall install [clean] [make options]" echo " or: makeall clean" echo " or: makeall library" + echo " or: makeall test" exit 1 endif if ( "$1" == library ) then @@ -20,6 +21,23 @@ if ( "$1" == library ) then echo " RAYPATH=.:$ldir" echo " export RAYPATH" echo "" + exit 0 +endif +if ( "$1" == test ) then + cd test + set fails=() + foreach d (cal gen util px renders) + cd $d + make -k clean all && make clean + if ($status) set fails=($fails $d) + cd .. + end + if ($#fails) then + echo "Unit tests failed in $#fails directories" + echo "Run 'make' manually in test/ subfolders: $fails" + exit 1 + endif + echo "All tests passed successfully." exit 0 endif set srcdirs=( common rt meta cv gen ot px hd util cal )