Skip to content

Commit

Permalink
FPP v1.3.0 integration (#2103)
Browse files Browse the repository at this point in the history
* Start functional tests for FPP component autocoder

* Add test components and formal param template types

* Create general formal param types and update test components

* Fix FppTest utilities

* Update test component and formal param types

* Add telemetry tests for FPP components

* Add macros to generate test code in FPP component autocoder tests

* Add telemetry tests for queued and passive FPP components

* Use formal param types in FPP port autocoder tests

* Share a main test file between FPP component tests

* Add empty FPP component test

* Add event tests for active FPP components

* Add event tests for all FPP component types

* Start parameter tests for FPP components

* Add parameter tests for FPP components

* Update parameter tests for FPP components

* Merge port tests into FPP component tests

* Update port tests for FPP components

* Format macros

* Reorganize FPP tests

* Add command tests for FPP components

* Add parameter command tests for FPP components

* Update FPP tests

* Update FPP tests

* Update FPP tests

* Remove unnecessary ports

* Add async FPP component tests

* Revise FPP port tests

* Reorganize FPP tests

* Format macros

* Update FPP tests

* Add headers

* Fix typo

* Update expected words for spell checker

* Update expected words for spell checker

* Run clang format

* Update fprime-fpp version

* Update FPP version

---------

Co-authored-by: bocchino <[email protected]>
  • Loading branch information
2 people authored and thomas-bc committed Aug 4, 2023
1 parent e0b2d95 commit 70991be
Show file tree
Hide file tree
Showing 94 changed files with 8,535 additions and 2,892 deletions.
24 changes: 17 additions & 7 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ coldarm
colno
COLORSTYLE
colorwheel
COMBUFFER
comlogger
COMMANDDISPATCHERIMPL
COMMANDDISPATCHERIMPLCFG
commandline
commasepitem
COMBUFFER
commonpath
COMPACKET
COMPONENTTESTERIMPL
Expand Down Expand Up @@ -240,9 +240,9 @@ Cpkt
cplusplus
CPOL
cpos
cppcheck
cppcheckxml
cpplint
cppcheck
cppreference
cprogramming
cpuset
Expand Down Expand Up @@ -275,13 +275,13 @@ csum
ctest
ctime
CTORS
ctu
CTX
ctype
culates
curdir
curmsgs
cuz
ctu
cwd
CYCLEOUT
cygwin
Expand Down Expand Up @@ -457,8 +457,11 @@ ethanchee
etime
ETIMEDOUT
eturn
EVENTARRAY
EVENTBOOL
EVENTID
eventname
EVENTPRIMITIVE
evr
evt
EXAMPLECOMPONENTIMPL
Expand Down Expand Up @@ -901,8 +904,8 @@ mul
multiarch
multioptionals
multirequired
multline
multitool
multline
munmap
mutex
mutexattr
Expand Down Expand Up @@ -1026,8 +1029,14 @@ packetizer
Packetizing
Paetz
Pandian
PARAMARRAY
PARAMBOOL
PARAMDOC
PARAMENUM
params
PARAMSTRING
PARAMSTRUCT
PARAMU
PARENB
PARODD
parseable
Expand Down Expand Up @@ -1301,8 +1310,8 @@ Sinha
SIZ
sizeof
sloc
Smath
smallsat
Smath
SNDTIMEO
snprintf
sockaddr
Expand Down Expand Up @@ -1334,8 +1343,8 @@ srand
srandom
srange
src
srcs
SRCS
srcs
sre
sscanf
ssh
Expand Down Expand Up @@ -1569,6 +1578,7 @@ UNEXP
unexport
unicode
UNINIT
UNINSTANTIATED
uniq
unistd
Unithem
Expand Down Expand Up @@ -1659,8 +1669,8 @@ wxgui
Xabcdefx
xapian
xargs
Xcode
XBee
Xcode
xcode
xdf
xdffe
Expand Down
7 changes: 5 additions & 2 deletions FppTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ if (BUILD_TESTING AND NOT __FPRIME_NO_UT_GEN__)
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/enum/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/array/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/struct/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/component/")
endif()

set(SOURCE_FILES "source.cpp")
set(MOD_DEPS
${PROJECT_NAME}/enum
${PROJECT_NAME}/array
${PROJECT_NAME}/struct
${PROJECT_NAME}/port
${PROJECT_NAME}/component/empty
${PROJECT_NAME}/component/active
${PROJECT_NAME}/component/queued
${PROJECT_NAME}/component/passive
)

register_fprime_deployment()
2 changes: 1 addition & 1 deletion FppTest/array/FormatTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ TEST_F(FormatTest, String) {

TEST_F(FormatTest, Char) {
U8 testVals[FormatChar::SIZE] =
{FppTest::Utils::getU8(), FppTest::Utils::getU8(), FppTest::Utils::getU8()};
{FppTest::Utils::getNonzeroU8(), FppTest::Utils::getNonzeroU8(), FppTest::Utils::getNonzeroU8()};
FormatChar a(testVals);

buf1 << a;
Expand Down
6 changes: 3 additions & 3 deletions FppTest/array/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ void FppTest::Array::setTestVals<Struct>(S (&a)[Struct::SIZE]) {
U32 b[3];
for (U32 i = 0; i < Struct::SIZE; i++) {
for (U32 j = 0; j < 3; j++) {
b[j] = FppTest::Utils::getU32();
b[j] = FppTest::Utils::getNonzeroU32();
}
a[i].set(FppTest::Utils::getU32(), b);
a[i].set(FppTest::Utils::getNonzeroU32(), b);
}
}

Expand All @@ -82,7 +82,7 @@ void FppTest::Array::setTestVals<Uint32Array>(Uint32 (&a)[Uint32Array::SIZE]) {
Uint32 b;
for (U32 i = 0; i < Uint32Array::SIZE; i++) {
for (U32 j = 0; j < Uint32::SIZE; j++) {
b[j] = FppTest::Utils::getU32();
b[j] = FppTest::Utils::getNonzeroU32();
}
a[i] = b;
}
Expand Down
8 changes: 8 additions & 0 deletions FppTest/component/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ======================================================================
# CMakeLists.txt
# ======================================================================

add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/empty/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/active/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/queued/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/passive/")
9 changes: 9 additions & 0 deletions FppTest/component/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# FppTest/component

This directory contains unit tests for the FPP component code generator.

To use this directory, you must have installed F Prime, and you must be inside
the F Prime Python virtual environment.

* To build the tests, run `fprime-util build --ut`.
* To run the tests, run `fprime-util check`.
Loading

0 comments on commit 70991be

Please sign in to comment.