Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

91 lines (80 sloc) 4.868 kB
(defpackage #:test-grid-tests
(:use :cl))
(in-package #:test-grid-tests)
(defun test-rt-api ()
(test-grid-testsuites::clean-rt)
(asdf:clear-system :rt-sample-test-suite)
(asdf:operate 'asdf:load-op :rt-sample-test-suite)
(let ((status (test-grid-testsuites::run-rt-test-suite)))
(and (test-grid-utils::set= (getf status :failed-tests)
'("test-1" "test-4")
:test #'string=)
(test-grid-utils::set= (getf status :known-to-fail)
'("test-3")
:test #'string=))))
(defun test-lift-api ()
(asdf:operate 'asdf:load-op :lift-sample-test-suite)
(let ((status (test-grid-testsuites::run-lift-test-suite :sample-lift-suite)))
(and (test-grid-utils::set= (getf status :failed-tests)
'("sample-lift-suite.test-2"
"sample-lift-suite.2-plus-2-is-3"
"sample-lift-suite.expected-error-test"
"sample-lift-suite.expected-failure-test"
"sample-lift-suite.expected-problem-test"
"sample-lift-suite.expected-error-but-fail-test")
:test #'string=)
(test-grid-utils::set= (getf status :known-to-fail)
'("sample-lift-suite.expected-error-test"
"sample-lift-suite.expected-failure-test"
"sample-lift-suite.expected-problem-test"
"sample-lift-suite.unexpected-no-failure-test"
"sample-lift-suite.unexpected-no-error-test"
"sample-lift-suite.expected-error-but-fail-test")
:test #'string=))))
(defun test-fiveam-api ()
(asdf:operate 'asdf:load-op :fiveam-sample-test-suite)
(let ((status (test-grid-testsuites::run-fiveam-test-suite :sample-fiveam-suite)))
(and (test-grid-utils::set= (getf status :failed-tests)
'("fiveam-sample-test-suite.error-test"
"fiveam-sample-test-suite.fail-test")
:test #'string=)
(null (getf status :known-to-fail)))))
(defun test-eos-api ()
(asdf:operate 'asdf:load-op :eos-sample-test-suite)
(let ((status (test-grid-testsuites::run-eos-test-suites :sample-eos-suite)))
(and (test-grid-utils::set= (getf status :failed-tests)
'("eos-sample-test-suite.error-test"
"eos-sample-test-suite.fail-test")
:test #'string=)
(null (getf status :known-to-fail)))))
(defun test-stefil-api ()
(asdf:operate 'asdf:load-op :stefil-sample-test-suite)
(let ((status (test-grid-testsuites::run-stefil-test-suite (intern (string '#:sample-stefil-suite)
'#:stefil-sample-test-suite))))
(and (test-grid-utils::set= (getf status :failed-tests)
'("sample-stefil-suite.one-fail-test"
"sample-stefil-suite.two-fails-test"
"sample-stefil-suite.error-test"
"sample-stefil-suite.all-fails-expected-test"
"sample-stefil-suite.not-all-fails-expected-test")
:test #'string=)
(null (getf status :known-to-fail)))))
(defun test-aggregated-status ()
(and (eq :ok (test-grid-reporting::aggregated-status :ok))
(eq :fail (test-grid-reporting::aggregated-status :fail))
(eq :no-resource (test-grid-reporting::aggregated-status :no-resource))
(eq :load-failed (test-grid-reporting::aggregated-status :load-failed))
(eq :crash (test-grid-reporting::aggregated-status :crash))
(eq :timeout (test-grid-reporting::aggregated-status :timeout))
(eq :fail (test-grid-reporting::aggregated-status '(:failed-tests ("a") :known-to-fail ("b"))))
(eq :unexpected-ok (test-grid-reporting::aggregated-status '(:failed-tests () :known-to-fail ("b"))))
(eq :fail (test-grid-reporting::aggregated-status '(:failed-tests ("a") :known-to-fail ())))
(eq :known-fail (test-grid-reporting::aggregated-status '(:failed-tests ("a") :known-to-fail ("a"))))
(eq :ok (test-grid-reporting::aggregated-status '(:failed-tests () :known-to-fail ())))))
; to run the tests:
(assert (and (test-rt-api)
(test-lift-api)
(test-fiveam-api)
(test-eos-api)
(test-stefil-api)
(test-aggregated-status)))
Jump to Line
Something went wrong with that request. Please try again.