Skip to content

Commit

Permalink
Move ansi-test to extrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Jan 18, 2024
1 parent 08fe7af commit f4e854c
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
asdf-add
- name: Run Regression Tests
run: |
lisp -i ${{ matrix.lisp }} -e "(ql:quickload :invistra-extrinsic/test)" -e "(asdf:test-system :invistra-extrinsic)"
lisp -i ${{ matrix.lisp }} -e "(defparameter cl-user::*exit-on-test-failures* t)" -e "(ql:quickload :invistra-extrinsic/test)" -e "(parachute:test :invistra-extrinsic/test/regression)"
- name: Run ANSI Tests
run: |
lisp -i ${{ matrix.lisp }} -e "(ql:quickload :invistra-shim/test)" -e "(asdf:test-system :invistra-shim)"
lisp -i ${{ matrix.lisp }} -e "(ql:quickload :invistra-extrinsic/test)" -e "(invistra-extrinsic/test/ansi:test :exit t)"
49 changes: 49 additions & 0 deletions code/extrinsic/test/ansi-test.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
(in-package #:invistra-extrinsic/test/ansi)

(defvar *tests*
'("FORMAT."
"FORMATTER."))

(defvar *extrinsic-symbols*
'(incless-extrinsic:pprint
incless-extrinsic:prin1
incless-extrinsic:prin1-to-string
incless-extrinsic:princ
incless-extrinsic:princ-to-string
incless-extrinsic:print
incless-extrinsic:print-object
incless-extrinsic:print-unreadable-object
incless-extrinsic:write
incless-extrinsic:write-to-string
inravina-extrinsic:*print-pprint-dispatch*
inravina-extrinsic:copy-pprint-dispatch
inravina-extrinsic:pprint-dispatch
inravina-extrinsic:pprint-exit-if-list-exhausted
inravina-extrinsic:pprint-fill
inravina-extrinsic:pprint-indent
inravina-extrinsic:pprint-linear
inravina-extrinsic:pprint-logical-block
inravina-extrinsic:pprint-newline
inravina-extrinsic:pprint-pop
inravina-extrinsic:pprint-tab
inravina-extrinsic:pprint-tabular
inravina-extrinsic:set-pprint-dispatch
inravina-extrinsic:with-standard-io-syntax
invistra-extrinsic:format
invistra-extrinsic:formatter))

(defun test (&rest args)
(let ((system (asdf:find-system :invistra-extrinsic/test)))
(apply #'ansi-test-harness:ansi-test
:directory (merge-pathnames
(make-pathname :directory '(:relative
"dependencies"
"ansi-test"))
(asdf:component-pathname system))
:expected-failures (asdf:component-pathname
(asdf:find-component system
'("code"
"expected-failures.sexp")))
:extrinsic-symbols *extrinsic-symbols*
:tests *tests*
args)))
6 changes: 6 additions & 0 deletions code/extrinsic/test/expected-failures.sexp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#+(or clasp ecl sbcl) :NIL-VECTORS-ARE-STRINGS
#+(or clasp ecl) :ALLOW-NIL-ARRAYS
#+(or clasp ecl) :MAKE-CONDITION-WITH-COMPOUND-NAME
#+(or clasp ecl) :NO-FLOATING-POINT-UNDERFLOW-BY-DEFAULT

#+(or abcl clasp ecl sbcl) FORMAT.E.26
2 changes: 1 addition & 1 deletion code/extrinsic/test/format.lisp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(cl:in-package #:invistra-extrinsic/test)
(cl:in-package #:invistra-extrinsic/test/regression)

(defun format-eval (&rest args)
(apply #'invistra-extrinsic:format args))
Expand Down
6 changes: 5 additions & 1 deletion code/extrinsic/test/packages.lisp
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
(cl:in-package #:common-lisp-user)

(defpackage #:invistra-extrinsic/test
(defpackage #:invistra-extrinsic/test/regression
(:use #:cl #:parachute))

(defpackage #:invistra-extrinsic/test/ansi
(:use #:cl)
(:export #:test))
2 changes: 1 addition & 1 deletion code/radix-control.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'((:type integer :default 0)
(:type character :default #\Space)
(:type character :default #\,)
(:type (integer 1) :default 3)))
(:type integer :default 3)))

(defun print-radix-arg (client colon-p at-sign-p radix mincol padchar commachar comma-interval)
(let ((argument (consume-next-argument t)))
Expand Down
1 change: 0 additions & 1 deletion code/shim/test/expected-failures/clasp.sexp

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion code/shim/test/expected-failures/ecl.sexp

This file was deleted.

2 changes: 0 additions & 2 deletions code/shim/test/expected-failures/sbcl.sexp

This file was deleted.

5 changes: 0 additions & 5 deletions code/shim/test/packages.lisp

This file was deleted.

58 changes: 0 additions & 58 deletions code/shim/test/test.lisp

This file was deleted.

16 changes: 10 additions & 6 deletions invistra-extrinsic.asd
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,22 @@
(defsystem "invistra-extrinsic/test"
:description "Test system for Invistra"
:license "BSD"
:author "Robert Strandh"
:maintainer "Robert Strandh"
:author ("Robert Strandh"
"Tarn W. Burton")
:maintainer "Tarn W. Burton"
:version (:read-file-form "version.sexp")
:homepage "https://github.com/s-expressionists/Invistra"
:bug-tracker "https://github.com/s-expressionists/Invistra/issues"
:depends-on ("invistra-extrinsic"
"parachute")
"parachute"
"ansi-test-harness")
:perform (asdf:test-op (op c)
(defparameter cl-user::*exit-on-test-failures* t)
(uiop:symbol-call :parachute :test :invistra-extrinsic/test))
(uiop:symbol-call :invistra-extrinsic/test/ansi :test)
(uiop:symbol-call :parachute :test :invistra-extrinsic/test/regression))
:components ((:module code
:pathname "code/extrinsic/test/"
:serial t
:components ((:file "packages")
(:file "format")))))
(:file "format")
(:file "ansi-test")
(:static-file "expected-failures.sexp")))))
22 changes: 0 additions & 22 deletions invistra-shim.asd
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,8 @@
"inravina-native"
"invistra"
"trivial-package-locks")
:in-order-to ((test-op (test-op "invistra-shim/test")))
:components ((:module code
:pathname "code/shim/"
:serial t
:components ((:file "packages")
(:file "interface")))))

(defsystem "invistra-shim/test"
:description "ANSI Test system for Invistra"
:license "MIT"
:author ("Robert Strandh"
"Tarn W. Burton")
:maintainer "Tarn W. Burton"
:depends-on ("alexandria" "invistra-shim")
:perform (test-op (op c)
(symbol-call :invistra-shim/test :test))
:components ((:module "code"
:pathname "code/shim/test/"
:serial t
:components ((:file "packages")
(:file "test")))
(:module "expected-failures"
:pathname "code/shim/test/expected-failures"
:components ((:static-file "default.sexp")
(:static-file "clasp.sexp")
(:static-file "ecl.sexp")
(:static-file "sbcl.sexp")))))

0 comments on commit f4e854c

Please sign in to comment.