Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support extended test status in reports. Add the tests to git. Better…
… formatting of test status in the library log.
- Loading branch information
1 parent
3237f54
commit 4ca87d1
Showing
5 changed files
with
102 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
;;; -*- Mode: LISP; Syntax: COMMON-LISP; indent-tabs-mode: nil; coding: utf-8; -*- | ||
;;; | ||
;;; Copyright (C) 2011 Anton Vodonosov (avodonosov@yandex.ru) | ||
;;; | ||
;;; See LICENSE for details. | ||
|
||
(asdf:defsystem #:test-grid-tests | ||
:version "0.1.0" | ||
:serial t | ||
:depends-on (#:test-grid) | ||
:components ((:file "test-grid-tests"))) | ||
|
||
(defpackage #:test-grid-tests-config (:export #:*src-base-dir*)) | ||
(defparameter test-grid-tests-config:*src-base-dir* | ||
(make-pathname :name nil :type nil :defaults *load-truename*)) | ||
|
||
;; make sample test suites available to ASDF | ||
(pushnew (merge-pathnames "sample-test-suites/" | ||
test-grid-tests-config:*src-base-dir*) | ||
asdf:*central-registry* | ||
:test #'equal) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
(defpackage #:test-grid-tests | ||
(:use :cl)) | ||
|
||
(in-package #:test-grid-tests) | ||
|
||
(defun test-rt-api () | ||
(test-grid::require-impl '#:rt-api) | ||
(rt-api:clean) | ||
|
||
(asdf:clear-system :rt-sample-test-suite) | ||
(asdf:operate 'asdf:load-op :rt-sample-test-suite) | ||
|
||
(let ((status (test-grid::run-rt-test-suite))) | ||
(and (test-grid::set= (getf status :failed-tests) | ||
'("test-1" "test-4") | ||
:test #'string=) | ||
(test-grid::set= (getf status :known-to-fail) | ||
'("test-3") | ||
:test #'string=)))) | ||
|
||
(defun test-aggregated-status () | ||
(and (eq :ok (test-grid::aggregated-status :ok)) | ||
(eq :fail (test-grid::aggregated-status :fail)) | ||
(eq :no-resource (test-grid::aggregated-status :no-resource)) | ||
(eq :fail (test-grid::aggregated-status '(:failed-tests ("a") :known-to-fail ("b")))) | ||
(eq :fail (test-grid::aggregated-status '(:failed-tests () :known-to-fail ("b")))) | ||
(eq :fail (test-grid::aggregated-status '(:failed-tests ("a") :known-to-fail ()))) | ||
(eq :known-fail (test-grid::aggregated-status '(:failed-tests ("a") :known-to-fail ("a")))) | ||
(eq :ok (test-grid::aggregated-status '(:failed-tests () :known-to-fail ()))))) | ||
|
||
; to run the tests: | ||
(and (test-aggregated-status) | ||
(test-rt-api)) | ||
; expected to return T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters