Skip to content

Commit

Permalink
Integrate/fpp v2 (#2293)
Browse files Browse the repository at this point in the history
* WIP: FPP v2

* Initial integration of FPP UT generation

* Updating UT GTestBase.hpp includes

* Update fpp version

* Revise header path

* Revise test; add modified generated code

* Revise modified code gen

* Revise modified generated code

* Add and move files

* Revise Fpp tests

* Add fpp deps

* Update fpp version

* Update include paths

* Fix unit tests

* Fix unit tests

* Revise TlmPacketizer test

* Fix unit tests

* Fix unit tests

* Delete temporary files

* Updating for new FPP tools flags

* Bump for fixed FPP tools

* Migrating TcpServer unit tests to v3.4.0 standards

* Migrating Udp unit tests to v3.4.0 standards

* Migrating LinuxSpiDriver unit tests to v3.4.0 standards

* Migrating LinuxI2cDriver unit tests to v3.4.0 standards

* Migrating LinuxGpioDriver unit tests to v3.4.0 standards

* Migrating TcpClient unit tests to v3.4.0 standards

* Migrating StreamCrossover unit tests to v3.4.0 standards

* Migrating SignalGen unit tests to v3.4.0 standards

* Migrating Checksum unit tests to v3.4.0 standards

* Migrating queued unit tests to v3.4.0 standards

* Migrating empty unit tests to v3.4.0 standards

* Migrating passive unit tests to v3.4.0 standards

* Migrating active unit tests to v3.4.0 standards

* Migrating FilePacket unit tests to v3.4.0 standards

* Migrating Logger unit tests to v3.4.0 standards

* Migrating port_return_type unit tests to v3.4.0 standards

* Migrating ext_dict unit tests to v3.4.0 standards

* Migrating time_tester unit tests to v3.4.0 standards

* Migrating serial_passive unit tests to v3.4.0 standards

* Migrating tlm_multi_inst unit tests to v3.4.0 standards

* Migrating param2 unit tests to v3.4.0 standards

* Migrating param_string unit tests to v3.4.0 standards

* Migrating command_string unit tests to v3.4.0 standards

* Migrating command_res unit tests to v3.4.0 standards

* Migrating tlm_onchange unit tests to v3.4.0 standards

* Migrating param_multi_inst unit tests to v3.4.0 standards

* Migrating command2 unit tests to v3.4.0 standards

* Migrating port_nogen unit tests to v3.4.0 standards

* Migrating tlm2 unit tests to v3.4.0 standards

* Migrating command_tester unit tests to v3.4.0 standards

* Migrating event2 unit tests to v3.4.0 standards

* Migrating param_tester unit tests to v3.4.0 standards

* Migrating tlm_string unit tests to v3.4.0 standards

* Migrating testgen unit tests to v3.4.0 standards

* Migrating log_tester unit tests to v3.4.0 standards

* Migrating port_loopback unit tests to v3.4.0 standards

* Migrating param_enum unit tests to v3.4.0 standards

* Migrating command_multi_inst unit tests to v3.4.0 standards

* Migrating log1 unit tests to v3.4.0 standards

* Migrating event_multi_inst unit tests to v3.4.0 standards

* Migrating serialize_user unit tests to v3.4.0 standards

* Migrating telem_tester unit tests to v3.4.0 standards

* Migrating param1 unit tests to v3.4.0 standards

* Migrating event_throttle unit tests to v3.4.0 standards

* Migrating string_port unit tests to v3.4.0 standards

* Migrating command1 unit tests to v3.4.0 standards

* Migrating noargport unit tests to v3.4.0 standards

* Migrating time_get unit tests to v3.4.0 standards

* Migrating event_enum unit tests to v3.4.0 standards

* Migrating comp_no_namespace unit tests to v3.4.0 standards

* Migrating event1 unit tests to v3.4.0 standards

* Migrating event_string unit tests to v3.4.0 standards

* Migrating tlm1 unit tests to v3.4.0 standards

* Migrating comp_diff_namespace unit tests to v3.4.0 standards

* Migrating tlm_enum unit tests to v3.4.0 standards

* Migrating pass_by_attrib unit tests to v3.4.0 standards

* Migrating stress unit tests to v3.4.0 standards

* Migrating interface1 unit tests to v3.4.0 standards

* Migrating templates unit tests to v3.4.0 standards

* Migrating FileUplink unit tests to v3.4.0 standards

* Migrating ComLogger unit tests to v3.4.0 standards

* Migrating SystemResources unit tests to v3.4.0 standards

* Migrating TlmPacketizer unit tests to v3.4.0 standards

* Migrating ComStub unit tests to v3.4.0 standards

* Migrating ComSplitter unit tests to v3.4.0 standards

* Migrating Health unit tests to v3.4.0 standards

* Migrating BufferLogger unit tests to v3.4.0 standards

* Migrating AssertFatalAdapter unit tests to v3.4.0 standards

* Migrating FileDownlink unit tests to v3.4.0 standards

* Migrating StaticMemory unit tests to v3.4.0 standards

* Migrating CmdSequencer unit tests to v3.4.0 standards

* Migrating Framer unit tests to v3.4.0 standards

* Migrating GroundInterface unit tests to v3.4.0 standards

* Migrating FileManager unit tests to v3.4.0 standards

* Migrating ActiveTextLogger unit tests to v3.4.0 standards

* Migrating LinuxTime unit tests to v3.4.0 standards

* Migrating Deframer unit tests to v3.4.0 standards

* Migrating Deframer unit tests to v3.4.0 standards

* Migrating BufferRepeater unit tests to v3.4.0 standards

* Migrating TlmChan unit tests to v3.4.0 standards

* Migrating GenericHub unit tests to v3.4.0 standards

* Migrating BufferAccumulator unit tests to v3.4.0 standards

* Migrating LinuxTimer unit tests to v3.4.0 standards

* Migrating BufferManager unit tests to v3.4.0 standards

* Migrating CmdSplitter unit tests to v3.4.0 standards

* Migrating ComQueue unit tests to v3.4.0 standards

* Migrating Os unit tests to v3.4.0 standards

* Federating FPP tools with release versions

* Python formatting

* Reverting FPPTest to correctly working build

* Removing minor dead code and comments

---------

Co-authored-by: bocchino <[email protected]>
  • Loading branch information
LeStarch and bocchino authored Oct 5, 2023
1 parent 1395f2a commit f797734
Show file tree
Hide file tree
Showing 278 changed files with 2,054 additions and 1,983 deletions.
2 changes: 1 addition & 1 deletion Autocoders/Python/templates/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <templatesGTestBase.hpp>
#endif
// Very minimal to test autocoder. Some day they'll be actual unit test code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// ======================================================================

#include "Tester.hpp"
#include "command1Tester.hpp"

#define INSTANCE 0
#define MAX_HISTORY_SIZE 10
Expand All @@ -21,17 +21,17 @@ namespace Cmd {
// Construction and destruction
// ----------------------------------------------------------------------

Tester ::
Tester() :
command1Tester ::
command1Tester() :
Test1GTestBase("Tester", MAX_HISTORY_SIZE),
component("Test1")
{
this->initComponents();
this->connectPorts();
}

Tester ::
~Tester()
command1Tester ::
~command1Tester()
{

}
Expand All @@ -40,7 +40,7 @@ namespace Cmd {
// Tests
// ----------------------------------------------------------------------

void Tester ::
void command1Tester ::
toDo()
{
// TODO
Expand All @@ -50,7 +50,7 @@ namespace Cmd {
// Helper methods
// ----------------------------------------------------------------------

void Tester ::
void command1Tester ::
connectPorts()
{

Expand Down Expand Up @@ -80,7 +80,7 @@ namespace Cmd {

}

void Tester ::
void command1Tester ::
initComponents()
{
this->init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#ifndef TESTER_HPP
#define TESTER_HPP

#include "GTestBase.hpp"
#include "command1GTestBase.hpp"
#include "Autocoders/Python/test/command1/Test1ComponentImpl.hpp"

namespace Cmd {

class Tester :
class command1Tester :
public Test1GTestBase
{

Expand All @@ -28,13 +28,13 @@ namespace Cmd {

public:

//! Construct object Tester
//! Construct object command1Tester
//!
Tester();
command1Tester();

//! Destroy object Tester
//! Destroy object command1Tester
//!
~Tester();
~command1Tester();

public:

Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/command1/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <command1GTestBase.hpp>
#endif
#include "TesterBase.hpp"
#include <FpConfig.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/command2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ set(UT_MOD_DEPS
# UT_SOURCE_FILES: Sources for unit test
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Autocoders/Python/test/command2/TestComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/command2Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/main.cpp"
)
register_fprime_ut()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// ======================================================================

#include "Tester.hpp"
#include "command2Tester.hpp"

#define INSTANCE 0
#define MAX_HISTORY_SIZE 10
Expand All @@ -22,17 +22,17 @@ namespace AcTest {
// Construction and destruction
// ----------------------------------------------------------------------

Tester ::
Tester() :
command2Tester ::
command2Tester() :
TestCommandGTestBase("Tester", MAX_HISTORY_SIZE),
component("TestCommand")
{
this->initComponents();
this->connectPorts();
}

Tester ::
~Tester()
command2Tester ::
~command2Tester()
{

}
Expand All @@ -41,7 +41,7 @@ namespace AcTest {
// Tests
// ----------------------------------------------------------------------

void Tester ::
void command2Tester ::
msgTest()
{
for (NATIVE_UINT_TYPE iter=0; iter <= QUEUE_DEPTH; iter++) {
Expand All @@ -59,7 +59,7 @@ namespace AcTest {
// Helper methods
// ----------------------------------------------------------------------

void Tester ::
void command2Tester ::
connectPorts()
{

Expand Down Expand Up @@ -89,7 +89,7 @@ namespace AcTest {

}

void Tester ::
void command2Tester ::
initComponents()
{
this->init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#ifndef TESTER_HPP
#define TESTER_HPP

#include "GTestBase.hpp"
#include "command2GTestBase.hpp"
#include "Autocoders/Python/test/command2/TestCommandComponentImpl.hpp"

namespace AcTest {

class Tester :
class command2Tester :
public TestCommandGTestBase
{

Expand All @@ -28,13 +28,13 @@ namespace AcTest {

public:

//! Construct object Tester
//! Construct object command2Tester
//!
Tester();
command2Tester();

//! Destroy object Tester
//! Destroy object command2Tester
//!
~Tester();
~command2Tester();

public:

Expand Down
4 changes: 2 additions & 2 deletions Autocoders/Python/test/command2/test/ut/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Main.cpp
// ----------------------------------------------------------------------

#include "Tester.hpp"
#include "command2Tester.hpp"

TEST(Test, Miscellaneous) {
AcTest::Tester tester;
AcTest::command2Tester tester;
tester.msgTest();
}

Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/command_multi_inst/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <command_multi_instGTestBase.hpp>
#endif
#include "TesterBase.hpp"
#include <FpConfig.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/command_res/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set_target_properties(
# UT_SOURCE_FILES: Sources for unit test
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Autocoders/Python/test/command_res/Test1ComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/command_resTester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/main.cpp"
)
register_fprime_ut()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// ======================================================================

#include "Tester.hpp"
#include "command_resTester.hpp"

#define INSTANCE 0
#define MAX_HISTORY_SIZE 10
Expand All @@ -22,17 +22,17 @@ namespace Cmd {
// Construction and destruction
// ----------------------------------------------------------------------

Tester ::
Tester() :
command_resTester ::
command_resTester() :
Test1GTestBase("Tester", MAX_HISTORY_SIZE),
component("Test1")
{
this->initComponents();
this->connectPorts();
}

Tester ::
~Tester()
command_resTester ::
~command_resTester()
{

}
Expand All @@ -41,7 +41,7 @@ namespace Cmd {
// Tests
// ----------------------------------------------------------------------

void Tester ::
void command_resTester ::
residualTest()
{
// This test will do different things based on the configuration macro FW_CMD_CHECK_RESIDUAL
Expand Down Expand Up @@ -109,7 +109,7 @@ namespace Cmd {
// Helper methods
// ----------------------------------------------------------------------

void Tester ::
void command_resTester ::
connectPorts()
{

Expand Down Expand Up @@ -139,7 +139,7 @@ namespace Cmd {

}

void Tester ::
void command_resTester ::
initComponents()
{
this->init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#ifndef TESTER_HPP
#define TESTER_HPP

#include "GTestBase.hpp"
#include "command_resGTestBase.hpp"
#include "Autocoders/Python/test/command_res/Test1ComponentImpl.hpp"

namespace Cmd {

class Tester :
class command_resTester :
public Test1GTestBase
{

Expand All @@ -28,13 +28,13 @@ namespace Cmd {

public:

//! Construct object Tester
//! Construct object command_resTester
//!
Tester();
command_resTester();

//! Destroy object Tester
//! Destroy object command_resTester
//!
~Tester();
~command_resTester();

public:

Expand Down
4 changes: 2 additions & 2 deletions Autocoders/Python/test/command_res/test/ut/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Main.cpp
// ----------------------------------------------------------------------

#include "Tester.hpp"
#include "command_resTester.hpp"

TEST(Test, CmdResidual) {
Cmd::Tester tester;
Cmd::command_resTester tester;
tester.residualTest();
}

Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/command_string/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <command_stringGTestBase.hpp>
#endif
#include "TesterBase.hpp"
#include <FpConfig.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/command_tester/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <command_testerGTestBase.hpp>
#endif
#include "TesterBase.hpp"
#include <FpConfig.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <comp_diff_namespaceGTestBase.hpp>
#endif

// Very minimal to test autocoder. Some day they'll be actual unit test code
Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/comp_no_namespace/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <comp_no_namespaceGTestBase.hpp>
#endif

// Very minimal to test autocoder. Some day they'll be actual unit test code
Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/event1/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <event1GTestBase.hpp>
#endif

// Very minimal to test autocoder. Some day they'll be actual unit test code
Expand Down
2 changes: 1 addition & 1 deletion Autocoders/Python/test/event2/test/ut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef FPRIME_CMAKE
#include "Autocoder/GTestBase.hpp"
#else
#include <GTestBase.hpp>
#include <event2GTestBase.hpp>
#endif

// Very minimal to test autocoder. Some day they'll be actual unit test code
Expand Down
Loading

0 comments on commit f797734

Please sign in to comment.