chipsalliance / caliptra-sw

Caliptra software (ROM, FMC, runtime firmware), and libraries/tools needed to build and test
Apache License 2.0
48 stars 35 forks source link

Move libcaliptra example functionality into a test.c file. #1602

Open zhalvorsen opened 2 days ago

zhalvorsen commented 2 days ago

This can make it easier to use the same test functionality in a different build system. Moves all test logic to test.c and only exposes a run_tests function that takes a parameter with the settings that will be used for the tests. The actually functionality of the test isn't changed at all.

Reading in the FW images was moved to main.c and an initialization function was added to interface.c. It gets initialized at the beginning of run_tests.

Some function parameters were changed to const because they weren't being changed within the function.

Also contains some #include cleanup.