Merge pull request 'Init ACS Test files' (#249) from mueller/acs-test-init into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #249
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
Robin Müller 2022-05-11 00:54:00 +02:00
commit cb8f0e61be
10 changed files with 62 additions and 4 deletions

3
.gitmodules vendored
View File

@ -19,3 +19,6 @@
[submodule "thirdparty/json"] [submodule "thirdparty/json"]
path = thirdparty/json path = thirdparty/json
url = https://github.com/nlohmann/json.git url = https://github.com/nlohmann/json.git
[submodule "thirdparty/rapidcsv"]
path = thirdparty/rapidcsv
url = https://github.com/d99kris/rapidcsv.git

View File

@ -308,6 +308,8 @@ if(EIVE_ADD_JSON_LIB)
add_subdirectory(${LIB_JSON_PATH}) add_subdirectory(${LIB_JSON_PATH})
endif() endif()
add_subdirectory(thirdparty/rapidcsv)
if(EIVE_ADD_LINUX_FILES) if(EIVE_ADD_LINUX_FILES)
add_subdirectory(${LIB_ARCSEC_PATH}) add_subdirectory(${LIB_ARCSEC_PATH})
add_subdirectory(${LINUX_PATH}) add_subdirectory(${LINUX_PATH})
@ -406,6 +408,7 @@ endif()
target_link_libraries(${UNITTEST_NAME} PRIVATE target_link_libraries(${UNITTEST_NAME} PRIVATE
Catch2 Catch2
${LIB_EIVE_MISSION} ${LIB_EIVE_MISSION}
rapidcsv
) )
if(TGT_BSP MATCHES "arm/egse") if(TGT_BSP MATCHES "arm/egse")

View File

@ -603,7 +603,7 @@
</extensions> </extensions>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" name="eive-q7s-debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=null" parent="org.eclipse.cdt.build.core.emptycfg"> <configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" name="eive-q7s-debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=null,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689." name="/" resourcePath=""> <folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.1439714522" name="Arm Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base"> <toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.1439714522" name="Arm Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1064018737" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1064018737" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>

View File

@ -20,7 +20,7 @@
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="cmake-build-debug/eive-unittest"/> <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="cmake-build-debug/eive-unittest"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="eive-obsw"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="eive-obsw"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/> <booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.775472168"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.758550634"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/eive-obsw"/> <listEntry value="/eive-obsw"/>
</listAttribute> </listAttribute>

1
thirdparty/rapidcsv vendored Submodule

@ -0,0 +1 @@
Subproject commit d4e0bc1047ca3965653463dc63f6d230a043a060

2
tmtc

@ -1 +1 @@
Subproject commit c5862579348974882e23d39d0a6d9b2844159b99 Subproject commit 6b7b07c3409fc24a8585c39e308156b3657c655e

View File

@ -1,3 +1,4 @@
target_sources(${UNITTEST_NAME} PRIVATE target_sources(${UNITTEST_NAME} PRIVATE
testThermalController.cpp testThermalController.cpp
testAcsController.cpp
) )

View File

@ -0,0 +1,47 @@
#include <fsfw/ipc/QueueFactory.h>
#include <mission/controller/ThermalController.h>
#include <catch2/catch_test_macros.hpp>
#include "../testEnvironment.h"
#include <fstream>
#include <stdexcept>
#include <iostream>
#include "rapidcsv.h"
TEST_CASE("ACS Controller", "[AcsController]") {
SECTION("SectionTest") {
//acsCtrl.performOperation();
CHECK(1 == 1);
try {
{
std::ifstream file("unittest/meineTestDaten.txt");
if (file.good()) {
std::string line;
while(std::getline(file, line)) {
std::cout << "ACS CTRL Test test file: " << line << std::endl;
}
}
}
{
rapidcsv::Document doc("unittest/meineTestDaten.txt");
std::vector<int> col = doc.GetColumn<int>("test0");
std::cout << "Read " << col.size() << " values: " << col[0] << ", " << col[1] << std::endl;
}
} catch (const std::exception& e) {
sif::warning << "CSV file test exception occured: " << e.what() << std::endl;
}
REQUIRE(2 == 2);
}
SECTION("SectionTest2") {
}
}

View File

@ -0,0 +1,3 @@
test0,test1,test2
0,2,3
4,5,6