nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.02k stars 1.3k forks source link

Add tests to `fprime-bootstrap` repo #2551

Open thomas-bc opened 6 months ago

thomas-bc commented 6 months ago
F´ Version
Affected Component fprime-bootstrap

Feature Description

We have a new tool, https://github.com/fprime-community/fprime-bootstrap . In my haste to make it available, I skipped writing simple tests to make sure things don't break down the line. It would be nice to write some simple tests that run the module and check that files are generated. Two things I'd like to see tested is:

As either of these would indicate something happened during the generation.

Bonus: these tests should be ran in CI, just like we do for example here https://github.com/fprime-community/fprime-tools/blob/devel/.github/workflows/fprime-tools-ci.yml (probably can reuse the exact same workflow definition)

thomas-bc commented 6 months ago

If anyone would like to work on this, please open a PR and tag me for review!

matt392code commented 6 months ago

Would I be able to take a crack at it?

thomas-bc

Matt in NYC

thomas-bc commented 6 months ago

Yes of course :)

matt392code commented 6 months ago

I am sorry, but I am not very familiar with F Prime code. Are these the programs that you need tested under the FppTest directory? d----- 3/1/2024 4:58 PM Autocoders d----- 3/1/2024 4:58 PM CFDP d----- 3/1/2024 4:58 PM ci d----- 3/1/2024 4:58 PM cmake d----- 3/1/2024 4:58 PM config d----- 3/1/2024 4:58 PM docs d----- 3/1/2024 4:58 PM Drv d----- 3/1/2024 4:58 PM Fpp d----- 3/1/2024 5:01 PM FppTest d----- 3/1/2024 4:58 PM Fw d----- 3/1/2024 4:58 PM googletest d----- 3/1/2024 4:58 PM Os d----- 3/1/2024 4:58 PM Ref d----- 3/1/2024 4:58 PM RPI d----- 3/1/2024 4:58 PM STest d----- 3/1/2024 4:58 PM Svc d----- 3/1/2024 4:58 PM Utils FppTest

thomas-bc commented 6 months ago

Everything should be done in this repo: https://github.com/fprime-community/fprime-bootstrap This is a Python application, and we need tests using pytest.

See how we have small tests for example on https://github.com/fprime-community/fprime-visual/blob/main/test/test_flask_app.py - we'd need something similar to invoke the main function of fprime-bootstrap, and make sure it produces the desired files and processes them correctly.

matt392code commented 6 months ago

Thank you for the extra information. I will have to spend some time reading up on the F Prime documentation to make sure I am doing it correctly. Will use Debian Linux.

thomas-bc commented 6 months ago

Using F´bootstrap is explained here: https://fprime-community.github.io/fprime-tutorial-hello-world/docs/NewProject.html

This should be enough to understand what it's supposed to do.

matt392code commented 6 months ago

Set up F Prime on a Debian Linux emulation using VirtualBox and working my way through the tutorials. Having some issues building. Will rest and take another look at it in a day or so.

matt392code commented 6 months ago

Still working on it. Researching a CMake error.

matt392code commented 6 months ago

Making progress.

matt392code commented 6 months ago

Moving forward. Sorry for the delay.

thomas-bc commented 6 months ago

No problem at all, there's no rush. Let me know if you have any questions

matt392code commented 6 months ago

Finished HelloWorld tutorial: HelloWorldJpl

matt392code commented 6 months ago

Working on Math tutorial