Skip to content

Commit 41af3d1

Browse files
committed
Load tests.lisp in cross compiled jscl
1 parent 2401c5f commit 41af3d1

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/toplevel.lisp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ All errors are caught and report to *ERROR-OUTPUT*."
321321
#:jsbool #:clbool
322322
#:in)
323323
(:export
324+
#:*root*
324325
#:object
325326
#:oget #:oset #:oget?
326327
#:typeof #:instanceof #:new

tests.lisp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
(defvar *use-html-output-p* nil)
1111
(defvar *timestamp* nil)
1212

13+
#+(and jscl (not jscl-target))
14+
(use-package :jscl/ffi)
15+
1316
;; Initialize timestamp at load time (for prebuilt mode where tests
1417
;; execute immediately during jscl-tests.js loading)
1518
(setq *timestamp* (get-internal-real-time))
@@ -95,13 +98,13 @@
9598

9699
(defun exit-with-test-status ()
97100
"Exit the process with appropriate status code based on test results."
98-
#+jscl-target
101+
#+(or jscl jscl-target)
99102
(progn
100103
(when (in "phantom" *root*)
101104
(#j:phantom:exit *failed-tests*))
102105
(when (in "process" *root*)
103106
(#j:process:exit *failed-tests*)))
104-
#-jscl-target
107+
#-(or jscl jscl-target)
105108
(sb-ext:exit :code (if (zerop *failed-tests*) 0 (min *failed-tests* 255))))
106109

107110
;;;; Test File Discovery
@@ -116,7 +119,7 @@
116119
(let ((entry (clstring (aref entries i))))
117120
(when (and (> (length entry) 5)
118121
(string= (subseq entry (- (length entry) 5)) ".lisp"))
119-
(push (concat "tests/" entry) files)))))
122+
(push (concatenate 'string "tests/" entry) files)))))
120123
(push "tests/loop/validate.lisp" files)
121124
(push "tests/loop/base-tests.lisp" files)
122125
(nreverse files))

0 commit comments

Comments
 (0)