init acs test files
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-05-10 17:49:10 +02:00
parent 9f9fa9b41b
commit 0bd20ac9fd
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
10 changed files with 50 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

@ -311,6 +311,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})
@ -409,6 +411,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 1e25b08e40db28103b91814f7de5a47dae5b9e76 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,35 @@
#include <fsfw/ipc/QueueFactory.h>
#include <mission/controller/ThermalController.h>
#include <catch2/catch_test_macros.hpp>
#include "../testEnvironment.h"
#include <fstream>
#include <iostream>
#include "rapidcsv.h"
TEST_CASE("ACS Controller", "[AcsController]") {
SECTION("SectionTest") {
//acsCtrl.performOperation();
CHECK(1 == 1);
std::ifstream file("unittest/meineTestDaten.txt");
std::string line;
while(std::getline(file, line)) {
std::cout << "ACS CTRL Test test file: " << line << std::endl;
}
file.close();
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;
REQUIRE(2 == 2);
}
SECTION("SectionTest2") {
}
}

View File

@ -42,4 +42,4 @@ TEST_CASE("Thermal Controller", "[ThermalController]") {
componentTemperatures.commit(); componentTemperatures.commit();
QueueFactory::instance()->deleteMessageQueue(commandQueue); QueueFactory::instance()->deleteMessageQueue(commandQueue);
} }

View File

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