Skip to content

Latest commit

 

History

History
159 lines (93 loc) · 3.19 KB

File metadata and controls

159 lines (93 loc) · 3.19 KB

Test Coverage

Test coverage commands.

This directory contains make rules for running project unit tests and generating test coverage reports.

Usage

Usage: make <command> [<ENV_VAR>=<value> <ENV_VAR>=<value> ...]

Commands

test-cov

Runs unit tests and generates a test coverage report.

$ make test-cov

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-cov TESTS_FILTER='.*/blas/base/dasum/.*'

view-cov

Opens an HTML test coverage report in a local web browser.

$ make view-cov

clean-cov

Removes coverage artifacts, such as reports and HTML pages.

$ make clean-cov

JavaScript

test-javascript-cov

Runs JavaScript unit tests and generates a test coverage report.

$ make test-javascript-cov

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript-cov TESTS_FILTER='.*/blas/base/dasum/.*'

view-javascript-cov

Opens an HTML test coverage report in a local web browser.

$ make view-javascript-cov

clean-javascript-cov

Removes a JavaScript coverage directory (including all coverage artifacts).

$ make clean-javascript-cov

Notes

  • Commands supporting a TESTS_FILTER environment variable are useful when wanting to glob for test files (e.g., run all tests for a particular package).