The trivial-coverage Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The trivial-coverage Reference Manual

This is the trivial-coverage Reference Manual, version 0.0.4, generated automatically by Declt version 3.0 "Montgomery Scott" on Wed Mar 25 19:22:34 2020 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Trivial Coverage Manual

[in package TRIVIAL-COVERAGE]

pipeline status Quicklisp

Description

A simple Common Lisp library to print out the code coverage collected. Supports SBCL and CCL.

Installing trivial-coverage

This project is available in the latest QuickLisp distribution, so installing it is reduced to calling:

(ql:quickload :trivial-coverage)

But if you want access to the latest updates, install it by cloning the Git repository with

cd $HOME/quicklisp/local-projects
git clone https://gitlab.com/ediethelm/trivial-coverage.git

and then loading it as usual via QuickLisp as above.

Working Example

Assuming there is a system being tested and named :system-under-test, which has three files that should not be included in the coverage calculation. The following expression loads the system, executes the tests and reports the total coverage:

(trivial-coverage:test-and-print-coverage :system-under-test 
                                          :exclude '("test-system-under-test.lisp" 
                                                     "test-data-generator.lisp"
                                                     "documentation.lisp"))

To access the coverage value programatically the following is possible:

(declaim (optimize sb-cover:store-coverage-data))
((asdf:oos 'asdf:load-op :system-under-test)
(let ((report-path (merge-pathnames "coverage-report/" (asdf:system-source-directory :system-under-test))))
	   (sb-cover:reset-coverage)
	   (asdf:oos 'asdf:test-op :system-under-test)
	   (sb-cover:report report-path)
	   (get-coverage report-path :exclude exclude))

Exported Symbols

License Information

This library is released under the MIT License. Please refer to the LICENSE to get the full licensing text.

Contributing to this project

Please refer to the CONTRIBUTING document for more information.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 trivial-coverage

Author

Eric Diethelm <ediethelm@yahoo.com>

License

MIT

Description

A simple Common Lisp library to print out the code coverage collected. Supports SBCL and CCL.

Version

0.0.4

Dependency

lquery

Source

trivial-coverage.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 trivial-coverage.asd

Location

trivial-coverage.asd

Systems

trivial-coverage (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 trivial-coverage/package.lisp

Parent

trivial-coverage (system)

Location

package.lisp

Packages

trivial-coverage


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 trivial-coverage/trivial-coverage.lisp

Parent

trivial-coverage (system)

Location

trivial-coverage.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 trivial-coverage

A simple Common Lisp library to print out the code coverage collected by sb-cover. As such it only supports SBCL.

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: get-coverage REPORT-PATH &key EXCLUDE

Calculates the total code coverage reported by sb-cover (via the HTML report) and returns this value. *report-path* - the path to the directory containing the HTML coverage report
*exclude* - files to be excluded from the calculation

Package

trivial-coverage

Source

trivial-coverage.lisp (file)

Function: test-and-print-coverage SYSTEM &key EXCLUDE KEEP-REPORT STREAM

Loads and tests the given *system* collecting coverage information. Also prints a line containing the coverage to *stream*. *system* - name of the system to be tested
*exclude* - files to be excluded from the calculation
*keep-report* - if NIL, the generated HTML coverage files are removed
*stream* - the stream to which the coverage result shall be written

Package

trivial-coverage

Source

trivial-coverage.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: clear-coverage ()
Package

trivial-coverage

Source

trivial-coverage.lisp (file)

Function: create-coverage-report PATH
Package

trivial-coverage

Source

trivial-coverage.lisp (file)

Function: disable-coverage ()
Package

trivial-coverage

Source

trivial-coverage.lisp (file)

Function: enable-coverage ()
Package

trivial-coverage

Source

trivial-coverage.lisp (file)

Function: get-coverage-for-file HTML
Package

trivial-coverage

Source

trivial-coverage.lisp (file)

Function: pprint-coverage COVERAGE &key STREAM
Package

trivial-coverage

Source

trivial-coverage.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, trivial-coverage.asd: The trivial-coverage․asd file
File, Lisp, trivial-coverage/package.lisp: The trivial-coverage/package․lisp file
File, Lisp, trivial-coverage/trivial-coverage.lisp: The trivial-coverage/trivial-coverage․lisp file

L
Lisp File, trivial-coverage.asd: The trivial-coverage․asd file
Lisp File, trivial-coverage/package.lisp: The trivial-coverage/package․lisp file
Lisp File, trivial-coverage/trivial-coverage.lisp: The trivial-coverage/trivial-coverage․lisp file

T
trivial-coverage.asd: The trivial-coverage․asd file
trivial-coverage/package.lisp: The trivial-coverage/package․lisp file
trivial-coverage/trivial-coverage.lisp: The trivial-coverage/trivial-coverage․lisp file

Jump to:   F   L   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   E   F   G   P   T  
Index Entry  Section

C
clear-coverage: Internal functions
create-coverage-report: Internal functions

D
disable-coverage: Internal functions

E
enable-coverage: Internal functions

F
Function, clear-coverage: Internal functions
Function, create-coverage-report: Internal functions
Function, disable-coverage: Internal functions
Function, enable-coverage: Internal functions
Function, get-coverage: Exported functions
Function, get-coverage-for-file: Internal functions
Function, pprint-coverage: Internal functions
Function, test-and-print-coverage: Exported functions

G
get-coverage: Exported functions
get-coverage-for-file: Internal functions

P
pprint-coverage: Internal functions

T
test-and-print-coverage: Exported functions

Jump to:   C   D   E   F   G   P   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S   T  
Index Entry  Section

P
Package, trivial-coverage: The trivial-coverage package

S
System, trivial-coverage: The trivial-coverage system

T
trivial-coverage: The trivial-coverage system
trivial-coverage: The trivial-coverage package

Jump to:   P   S   T