#! /bin/bash
# Last edited on 2021-03-28 22:45:16 by jstolfi

# Run tests on all modules, in a logical sequence.

modules=( 
  color
  palette
  rootray
  rootray_cart
  hacks
  job_parms
  gcode
  \
  move_parms
  move
  path
  block
  contact
  seam 
  \
  move_example
  path_example
  block_example
  contact_example
  seam_example
)

for module in ${modules[@]}; do 
  if [[ ! ( -s ${module}.py ) ]] ; then
    echo "** module ${module}.py does not exist" 1>&2;
  elif [[ ! ( -s tests/${module}_TST.py ) ]]; then
    echo "** test program tests/${module}_TST.py does not exist" 1>&2;
  else
    run_test.sh ${module}
  fi
done

