#! /bin/csh -f
#
#  run tests and update the reference files 
#
  echo "running d3d_test..."

  ./d3d_test.csh > tmp.msgs
  set xstat = $status

  if ( $xstat == 0 ) then
    echo "d3d test OK: updating: d3d_test.mgs & d3d_output_state.cdf:"
    mv tmp.msgs d3d_test.msgs
    mv wkdir_d3d_test/d3d_output_state.cdf .
    rm -r wkdir_d3d_test
  else
    echo "d3d test error detected, reference copies not copied."
  endif

  echo "running tftr_test..."

  ./tftr_test.csh > tmp.msgs
  set xstat = $status

  if ( $xstat == 0 ) then
    echo "tftr test OK: updating: tftr_test.mgs & tftr_output_state.cdf:"
    mv tmp.msgs tftr_test.msgs
    mv wkdir_tftr_test/tftr_output_state.cdf .
    rm -r wkdir_tftr_test
  else
    echo "tftr test error detected, reference copies not copied."
  endif
