perform.test 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #! /bin/sh
  2. # -*-scheme-*-
  3. if [ "$MES" != guile ]; then
  4. MES=${MES-$(dirname $0)/../src/mes}
  5. MES_BOOT=boot-02.scm exec $MES < $0
  6. exit $?
  7. fi
  8. exec ${MES-mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests perform)' -s "$0" "$@"
  9. !#
  10. ;;; -*-scheme-*-
  11. ;;; GNU Mes --- Maxwell Equations of Software
  12. ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  13. ;;;
  14. ;;; This file is part of GNU Mes.
  15. ;;;
  16. ;;; GNU Mes is free software; you can redistribute it and/or modify it
  17. ;;; under the terms of the GNU General Public License as published by
  18. ;;; the Free Software Foundation; either version 3 of the License, or (at
  19. ;;; your option) any later version.
  20. ;;;
  21. ;;; GNU Mes is distributed in the hope that it will be useful, but
  22. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  23. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. ;;; GNU General Public License for more details.
  25. ;;;
  26. ;;; You should have received a copy of the GNU General Public License
  27. ;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
  28. (define-module (tests boot)
  29. #:use-module (mes mes-0)
  30. #:use-module (mes test))
  31. (cond-expand
  32. (mes
  33. (define (round x) x)
  34. (primitive-load "module/mes/test.scm"))
  35. (guile-2)
  36. (guile
  37. (use-modules (ice-9 syncase))))
  38. (pass-if "first dummy" #t)
  39. (pass-if-not "second dummy" #f)
  40. (pass-if-timeout "loop 1M"
  41. 100
  42. ((lambda (loop)
  43. (set! loop
  44. (lambda (i)
  45. (if (> i 0)
  46. (loop (- i 1)))))
  47. (loop 100000))
  48. *unspecified*))
  49. (result 'report 1) ; at least until we have bogomips, to fail