Skip to content
Tarn W. Burton edited this page Nov 23, 2022 · 7 revisions

ANSI tests

After building from source the complete ANSI test suite can be by executing the following:

ninja -C build ansi-test

The tests can be configured by adding the following features using the CLASP_FEATURES environment variable.

  • :ansi-dont-quit — don't exit after the run, good for debugging
  • :ansi-dont-start — don't start the tests (just load everything)
  • :ansi-compile-tests — compile tests before execution
  • :ansi-partial-execution - specify the subsets of the test to be run
    • :ansi-load-symbols
    • :ansi-load-eval-and-compile
    • :ansi-load-data-and-control-flow
    • :ansi-load-iteration
    • :ansi-load-objects
    • :ansi-load-conditions
    • :ansi-load-cons
    • :ansi-load-arrays
    • :ansi-load-hash-tables
    • :ansi-load-packages
    • :ansi-load-numbers
    • :ansi-load-sequences
    • :ansi-load-structures
    • :ansi-load-types-and-class
    • :ansi-load-strings
    • :ansi-load-characters
    • :ansi-load-pathnames
    • :ansi-load-files
    • :ansi-load-streams
    • :ansi-load-printer
    • :ansi-load-reader
    • :ansi-load-system-construction
    • :ansi-load-environment
    • :ansi-load-misc

For example, to run only the printer tests

CLASP_FEATURES=ansi-partial-execution,ansi-load-printer ninja -C build ansi-test

Running a subset

A subset of the ANSI tests may be run by using the ANSI_TEST_SUBSET environment variable and the ansi-test-subset target.

ANSI_TEST_SUBSET=FORMAT.C.2A,FORMATTER.C.2A ninja -C build ansi-test-subset

Random Tester

The random tester can be run by executing

ninja -C build test-random-integer

The tests can be configured with the RANDOM_INT_SIZE, RANDOM_INT_VARIABLES and RANDOM_INT_ITERATIONS environment variables. For example

RANDOM_INT_SIZE=100 RANDOM_INT_VARIABLES=4 RANDOM_INT_ITERATIONS=10000 ninja -C build test-random-integer
Clone this wiki locally