Enable firmware tests
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
f3067bfd2e
commit
01cf6ed26f
2 changed files with 36 additions and 0 deletions
24
tests/firmware/CMakeLists.txt
Normal file
24
tests/firmware/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
|
project(switch-pico-firmware-tests LANGUAGES CXX)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
add_executable(switch-pico-firmware-tests
|
||||||
|
../../switch2_commands.cpp
|
||||||
|
../../switch2_descriptors.cpp
|
||||||
|
../../switch2_reports.cpp
|
||||||
|
../../switch_uart_protocol.cpp
|
||||||
|
test_main.cpp
|
||||||
|
test_legacy_descriptors.cpp
|
||||||
|
test_switch2_commands.cpp
|
||||||
|
test_switch2_descriptors.cpp
|
||||||
|
test_switch2_reports.cpp
|
||||||
|
test_switch_input.cpp
|
||||||
|
test_switch_uart_protocol.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_features(switch-pico-firmware-tests PRIVATE cxx_std_17)
|
||||||
|
target_include_directories(switch-pico-firmware-tests PRIVATE ../..)
|
||||||
|
|
||||||
|
add_test(NAME switch-pico-firmware-tests COMMAND switch-pico-firmware-tests)
|
||||||
12
tests/firmware/test_main.cpp
Normal file
12
tests/firmware/test_main.cpp
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#include "test_support.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
TestRunner runner;
|
||||||
|
run_legacy_descriptor_tests(runner);
|
||||||
|
run_switch2_command_tests(runner);
|
||||||
|
run_switch2_descriptor_tests(runner);
|
||||||
|
run_switch2_report_tests(runner);
|
||||||
|
run_switch_input_tests(runner);
|
||||||
|
run_switch_uart_protocol_tests(runner);
|
||||||
|
return runner.result();
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue