Implement unit and system test infrastructure #17
Labels
enhancement
New feature or request
high priority
Extra attention is needed
input wanted
Issues whose implementations are open for discussion and suggestions
Milestone
Larger coding projects implement various forms of continuous integration (CI) as a means of ensuring that all code modifications and enhancements, before being integrated into the
master
code repository, are correct and robust. Although the SPARTAN project may not be as big as other "larger" coding projects, implementing a "miniature" form of CI would be most certainly ideal, as this ensures that as the SPARTAN FSW and sensor driver library develops further and continues to implement support for more and more sensor hardware modules, the integrity of our existing code-base is preserved.When would this testing infrastructure be run? Ideally, before any pull request is accepted and merged with
master
, all code modifications on that development branch would run these unit and system tests with the currentmaster
branch already merged in. If these checks pass, and no problems are found by the dedicated software reviewers, then we should be confident in our ability to accept the PR and merge intomaster
. Defining how this test infrastructure would exactly look like is completely up to us. Some ideas of how I was thinking the implementation would look like follows:Software/test
directory, one forunit_tests
, and the other forsystem_tests
. If we decide that separating the two types of tests in our context is too much, then we can leave this distinction out.system_tests
directory have sub-directories, one for each test. Everything needed for that test (with the exception of SPARTAN source code) would be contained within its corresponding sub-directory.run
orinput
shell script that will run the built SPARTAN executable in the way needed to test the modification-of-interest.make
target (such asmake test
) would build the SPARTAN FSW and automatically run all tests, likely through calling some testing script. If implementing the previously mentioned layout of system test "sub-directories", then this testing script would have to simply loop through all available sub-directories within thetest
directory and call their respectiverun
orinput
scripts. If any tests fail, the user will be notified automatically, and provided more information for means of debugging.These are just some rough ideas I was thinking of when first laying out this issue... Feel free to work with me and everyone else on the development team to make this into something amazing!
Related to #10 , as we should have a section describing the testing infrastructure's layout, as well as both the required and optional interfaces that developers need to know when adding new tests (i.e. must have
run
script, optionaloptions.txt
file that describes extra options to pass to SPARTAN, etc.).The text was updated successfully, but these errors were encountered: