You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.sh 402B

123456789101112131415161718192021222324
  1. #! /usr/bin/env sh
  2. for exe in omp-merge-sort-seq omp-merge-sort-par
  3. do
  4. echo "Running ${exe}"
  5. for tIn in tests/*.in
  6. do
  7. tOut=$(echo "${tIn}" | sed -re 's/(.+).in/\1/')".out"
  8. tmpfile=$(mktemp)
  9. cat "${tIn}" | "./${exe}" > "${tmpfile}"
  10. cmp "${tmpfile}" "${tOut}"
  11. res=$?
  12. if [ ${res} -ne 0 ]
  13. then
  14. echo "${tIn} failed"
  15. else
  16. echo "${tIn} succeded"
  17. rm "${tmpfile}"
  18. fi
  19. done
  20. done