The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

71 lines
2.1 KiB

2 months ago
  1. #! /bin/sh
  2. EXE=@EXEEXT@
  3. srcdir=@srcdir@
  4. file=test
  5. mfile=multi
  6. verbosity=2
  7. nthreads=4
  8. sed_command='-r:-e:s/0x[0-9a-f][0-9a-f]*//g:-e:s/dashed//:-e:s/dotted//:-e:s/[0-9][0-9]*.bytes//:-e:/[0-9][0-9]* ms//:-e:/modifiable/,$d'
  9. echo TAP version 13
  10. echo 1..2
  11. exitstatus=0
  12. # Create empty file.
  13. : > ./cplusplus/differences
  14. cplusplus/testobj$EXE $verbosity > ./cplusplus/${file}.tst 2>&1
  15. failed=`expr $? != 0`
  16. if test x$failed = x0; then
  17. echo "# comparing ./cplusplus/${file}.tst to ${srcdir}/cplusplus/${file}.out"
  18. mkfifo ./cplusplus/tst_fifo ./cplusplus/out_fifo
  19. OIFS=$IFS
  20. IFS=:
  21. `sed ${sed_command} ./cplusplus/${file}.tst > ./cplusplus/tst_fifo &\
  22. sed ${sed_command} ${srcdir}/cplusplus/${file}.out > ./cplusplus/out_fifo &\
  23. diff -b ./cplusplus/tst_fifo ./cplusplus/out_fifo >> ./cplusplus/differences`
  24. failed=`expr $? != 0`
  25. rm ./cplusplus/tst_fifo ./cplusplus/out_fifo
  26. IFS=$OIFS
  27. fi
  28. if test x$failed = x0 ; then
  29. echo "ok 1 BDD ADD ZDD basic test"
  30. else
  31. echo "not ok 1 base"
  32. fi
  33. exitstatus=`expr $exitstatus + $failed`
  34. cplusplus/testmulti$EXE $nthreads > ./cplusplus/${mfile}.tst 2>&1
  35. retval=$?
  36. failed=`expr $retval != 0`
  37. if test x$failed = x0; then
  38. echo "# comparing ./cplusplus/${mfile}.tst to ${srcdir}/cplusplus/${mfile}.out"
  39. mkfifo ./cplusplus/tst_fifo ./cplusplus/out_fifo
  40. OIFS=$IFS
  41. IFS=:
  42. `sed ${sed_command} ./cplusplus/${mfile}.tst > ./cplusplus/tst_fifo &\
  43. sed ${sed_command} ${srcdir}/cplusplus/${mfile}.out > ./cplusplus/out_fifo &\
  44. diff -b ./cplusplus/tst_fifo ./cplusplus/out_fifo >> ./cplusplus/differences`
  45. failed=`expr $? != 0`
  46. rm ./cplusplus/tst_fifo ./cplusplus/out_fifo
  47. IFS=$OIFS
  48. fi
  49. if test x$failed = x0 ; then
  50. echo "ok 2 multi-threaded multiple managers"
  51. elif test x$retval = x77 ; then
  52. failed=0
  53. echo "ok 2 multiple managers #SKIP thread header broken"
  54. else
  55. echo "not ok $count 2 multiple managers"
  56. fi
  57. exitstatus=`expr $exitstatus + $failed`
  58. if test x$exitstatus = x0; then
  59. rm -rf ./cplusplus/differences
  60. else
  61. echo '# Check file "./cplusplus/differences"'
  62. fi
  63. exit 0