Skip to content

Latest commit

 

History

History

tests

KLL Compiler - tests

Unit and functional tests for the KLL compiler. Some tests are stand-alone, while others require some additional git repositories (automatically downloaded).

Tests

Description of each of the KLL compiler tests.

To run the tests, use pytest

# All tests
pytest

# Multiple in parallel
pytest -n 8

# Show all output, even if test passes
pytest -s

# Run a specific file of tests
pytest tests/test_sanity.py

# Run a specific test in a file of tests
pytest tests/test_sanity.py -k test_help

Calls kll_regen target on each of the main keyboard targets of the Kiibohd Controller firmware. Validates that no KLL compiler changes have broken Input Club keyboards. Uses the kiibohd KLL compiler emitter. Will clone a copy of the Kiibohd Controller firmware to /tmp.

Call the KLL compiler in the same way the Kiibohd Controller firmware would, but for test cases that are not used in a typical keyboard. Used for KLL compiler feature testing. Uses the kiibohd KLL compiler emitter. Will clone a copy of the Kiibohd Controller firmware to /tmp.

Using the kll KLL compiler emitter regenerate KLL files, then validate the final kll against cmp_regen using the diff tool.

Call --version to make sure there are no Python syntax errors. Call --help to make sure there are no Python syntax errors.

Using the none KLL compiler emitter, use various kll files to validate syntax parsing and tokenization.

Files

Brief description of some general files.

  • klltest.py - Functions used across many/all of the tests.