eclipse-archived / kiso

Kiso Project
Other
30 stars 31 forks source link

Add integration test framework #200

Closed ChiefGokhlayehBosch closed 4 years ago

ChiefGokhlayehBosch commented 4 years ago

First import of integration test capabilities from Kiso's predecessor, based on preceding work by @khalifima (changed and refactored his work a little). Not much effort has been put into upgrading integration test code quality. What you see pretty much how it was sourced. The things we changed are manly cosmetic, one notable exception being the license headers, which were updated to EPL-2.0.

This draft currently only contains a fraction of the original integration test suite (namely only a single Essentials MCU UART test), more tests are to be added later on (in future PRs). The test spec has been updated accordingly.

To build an integration test, you first have to configure your CMake workspace with the ENABLE_INTEGRATION_TESTING setting set to ON and KISO_INTEGRATION_TEST_NAME set to a package containing integration tests.

    "cmake.configureSettings": {
        "KISO_BOARD_NAME": "NucleoF767",
        "KISO_INTEGRATION_TEST_NAME": "core/essentials",
        "ENABLE_INTEGRATION_TESTING": true
    }

The added test is only available for NUCLEO-F767ZI boards. To build the binary, run cmake with target testentry (or just build all). As per usual, you can use target flash to flash the binary.

Note KISO_APPLICATION_NAME is not needed when configuring with ENABLE_INTEGRATION_TESTING = ON and is instead replaced by KISO_INTEGRATION_TEST_NAME. This path points to the package which defines the testentry build target. It expects to find the necessary CMakeLists.txt file in ${KISO_INTEGRATION_TEST_NAME}/test/integration.

Relates to #17.

ChiefGokhlayehBosch commented 4 years ago

This PR combines #159 and #105.