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.

64 lines
1.7 KiB

2 months ago
  1. #! /bin/sh
  2. EXE=@EXEEXT@
  3. srcdir=@srcdir@
  4. file=r7x8.1
  5. verbosity=2
  6. sed_command='-r:-e:2,3d:-e:/Cache used slots/d:-e:/Average distance/d:-e:/modifiable/,$d:-e:s/[0-9][0-9]*\.?[0-9]* sec//:-e:/so far/d'
  7. echo TAP version 13
  8. echo 1..2
  9. exitstatus=0
  10. # Create empty file.
  11. : > ./cudd/differences
  12. cudd/testcudd$EXE -p $verbosity ${srcdir}/cudd/${file}.mat > ./cudd/${file}.tst 2>&1
  13. failed=`expr $? != 0`
  14. if test x$failed = x0 ; then
  15. echo "# comparing ./cudd/${file}.tst to ${srcdir}/cudd/${file}.out"
  16. mkfifo ./cudd/tst_fifo ./cudd/out_fifo
  17. OIFS=$IFS
  18. IFS=:
  19. `sed ${sed_command} ./cudd/${file}.tst > ./cudd/tst_fifo &\
  20. sed ${sed_command} ${srcdir}/cudd/${file}.out > ./cudd/out_fifo &\
  21. diff -b ./cudd/tst_fifo ./cudd/out_fifo >> ./cudd/differences`
  22. failed=`expr $? != 0`
  23. rm ./cudd/tst_fifo ./cudd/out_fifo
  24. IFS=$OIFS
  25. fi
  26. if test x$failed = x0 ; then
  27. echo ok 1 cudd basic
  28. else
  29. echo not ok 1 cudd basic
  30. fi
  31. exitstatus=`expr $exitstatus + $failed`
  32. cudd/testextra$EXE $verbosity > ./cudd/extra.tst 2>&1
  33. failed=`expr $? != 0`
  34. if test x$failed = x0 ; then
  35. echo "# comparing ./cudd/extra.tst to ${srcdir}/cudd/extra.out"
  36. mkfifo ./cudd/tst_fifo ./cudd/out_fifo
  37. OIFS=$IFS
  38. IFS=:
  39. `sed ${sed_command} ./cudd/extra.tst > ./cudd/tst_fifo &\
  40. sed ${sed_command} ${srcdir}/cudd/extra.out > ./cudd/out_fifo &\
  41. diff -b ./cudd/tst_fifo ./cudd/out_fifo >> ./cudd/differences`
  42. failed=`expr $? != 0`
  43. rm ./cudd/tst_fifo ./cudd/out_fifo
  44. IFS=$OIFS
  45. fi
  46. if test x$failed = x0 ; then
  47. echo ok 2 cudd extra
  48. else
  49. echo not ok 2 cudd extra
  50. fi
  51. exitstatus=`expr $exitstatus + $failed`
  52. if test x$exitstatus = x0; then
  53. rm -rf ./cudd/differences
  54. else
  55. echo '# Check file "./cudd/differences"'
  56. fi
  57. exit 0