run-on-many-lisps.lisp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. (ql:quickload :trivial-gray-streams)
  2. (ql:quickload :test-grid-agent)
  3. (ql:quickload :cl-fad)
  4. (in-package :cl-user)
  5. (defparameter *abcl* (make-instance 'lisp-exe:abcl
  6. :java-exe-path "C:\\Program Files\\Java\\jdk1.6.0_26\\bin\\java"
  7. :abcl-jar-path "C:\\Users\\anton\\unpacked\\abcl\\abcl-bin-1.1.0\\abcl.jar"))
  8. (defparameter *clisp* (make-instance 'lisp-exe:clisp :exe-path "clisp"))
  9. (defparameter *ccl-1.8-x86* (make-instance 'lisp-exe:ccl
  10. :exe-path "C:\\Users\\anton\\unpacked\\ccl\\ccl-1.8-windows\\wx86cl.exe"))
  11. (defparameter *ccl-1.8-x86-64* (make-instance 'lisp-exe:ccl
  12. :exe-path "C:\\Users\\anton\\unpacked\\ccl\\ccl-1.8-windows\\wx86cl64.exe"))
  13. (defparameter *sbcl-1.1.0.45* (make-instance 'lisp-exe:sbcl :exe-path "C:\\Program Files (x86)\\Steel Bank Common Lisp\\1.1.0.45\\run.bat"))
  14. (defparameter *sbcl-win-branch-64* (make-instance 'lisp-exe:sbcl :exe-path "C:\\Program Files\\Steel Bank Common Lisp\\1.1.0.36.mswinmt.1201-284e340\\run.bat"))
  15. (defparameter *sbcl-win-branch-32* (make-instance 'lisp-exe:sbcl :exe-path "C:\\Program Files (x86)\\Steel Bank Common Lisp\\1.1.0.36.mswinmt.1201-284e340\\run.bat"))
  16. (defparameter *ecl-bytecode* (make-instance 'lisp-exe:ecl
  17. :exe-path "C:\\Users\\anton\\projects\\ecl\\bin\\ecl.exe"
  18. :compiler :bytecode))
  19. (defparameter *ecl-lisp-to-c* (make-instance 'lisp-exe:ecl
  20. :exe-path "C:\\Users\\anton\\projects\\ecl\\bin\\ecl.exe"
  21. :compiler :lisp-to-c))
  22. (defparameter *acl* (make-instance 'lisp-exe:acl :exe-path "C:\\Program Files (x86)\\acl90express\\alisp.exe"))
  23. (defun run-on-many-lisps (run-description test-run-dir quicklisp-dir lisps)
  24. (ensure-directories-exist test-run-dir)
  25. (let ((fasl-root (merge-pathnames "fasl/" test-run-dir)))
  26. (labels ((log-name (lisp)
  27. (substitute #\- #\.
  28. ;; Substitute dots by hypens if our main process is CCL, it
  29. ;; prepends the > symbol before dots;
  30. ;; for example: 1.1.0.36.mswinmt.1201-284e340 => 1>.1>.0>.36>.mswinmt.1201-284e340
  31. ;; When we pass such a pathname to another lisps, they can't handle it.
  32. (string-downcase (tg-agent::implementation-identifier lisp))))
  33. (fasl-dir (lisp)
  34. (merge-pathnames (format nil "~A/" (log-name lisp))
  35. fasl-root))
  36. (run (lisp)
  37. (let* ((lib-result (tg-agent::proc-run-libtest lisp
  38. :trivial-gray-streams
  39. run-description
  40. (merge-pathnames (log-name lisp) test-run-dir)
  41. quicklisp-dir
  42. (fasl-dir lisp)))
  43. (status (getf lib-result :status)))
  44. (if (listp status)
  45. (getf status :failed-tests)
  46. status))))
  47. (let ((results (mapcar (lambda (lisp)
  48. (list (tg-agent::implementation-identifier lisp)
  49. (run lisp)))
  50. lisps)))
  51. (tg-utils::write-to-file results (merge-pathnames "resutls.lisp" test-run-dir))
  52. (cl-fad:delete-directory-and-files fasl-root)
  53. results))))
  54. (run-on-many-lisps '(:lib-world "quicklisp 2013-02-17 + trivial-gray-streams.head"
  55. :contact-email "avodonosov@yandex.ru")
  56. "C:\\Users\\anton\\projects\\trivial-gray-streams\\test\\"
  57. (merge-pathnames "quicklisp/" (user-homedir-pathname))
  58. (list *sbcl-1.1.0.45* *sbcl-win-branch-64* *sbcl-win-branch-32*
  59. *abcl*
  60. *clisp*
  61. *ccl-1.8-x86* *ccl-1.8-x86-64*
  62. *ecl-bytecode* *ecl-lisp-to-c*
  63. *acl*))