Bugfix #25
@ -6,6 +6,7 @@ import platform
|
||||
import sys
|
||||
import time
|
||||
import argparse
|
||||
import webbrowser
|
||||
from typing import List
|
||||
|
||||
|
||||
@ -18,6 +19,10 @@ information how to set up the build folder.
|
||||
def main():
|
||||
|
||||
parser = argparse.ArgumentParser(description="Processing arguments for LCOV helper script.")
|
||||
parser.add_argument(
|
||||
'-o', '--open', action='store_true', help='Open coverage data in webbrowser'
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
build_dir_list = []
|
||||
if not os.path.isfile('README.md'):
|
||||
@ -41,6 +46,8 @@ def main():
|
||||
print("Multiple build directories found!")
|
||||
build_directory = determine_build_dir(build_dir_list)
|
||||
perform_lcov_operation(build_directory)
|
||||
if os.path.isdir('fsfw-tests_coverage') and args.open:
|
||||
webbrowser.open('fsfw-tests_coverage/index.html')
|
||||
|
||||
|
||||
def check_for_cmake_build_dir(build_dir_dict: list):
|
||||
|
3
scripts/gen-unittest.sh
Executable file
3
scripts/gen-unittest.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
mkdir build-Unittest && cd build-Unittest
|
||||
cmake -DFSFW_BUILD_UNITTESTS=ON -DFSFW_OSAL=host -DCMAKE_BUILD_TYPE=Debug ..
|
@ -73,7 +73,7 @@ namespace spacepacket {
|
||||
|
||||
constexpr uint16_t getSpacePacketIdFromApid(bool isTc, uint16_t apid,
|
||||
bool secondaryHeaderFlag = true) {
|
||||
return (((isTc << 5) & 0x10) | ((secondaryHeaderFlag << 4) & 0x08) |
|
||||
return ((isTc << 4) | (secondaryHeaderFlag << 3) |
|
||||
((apid >> 8) & 0x07)) << 8 | (apid & 0x00ff);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
target_sources(${FSFW_TEST_TGT} PRIVATE
|
||||
PusTmTest.cpp
|
||||
testCcsds.cpp
|
||||
)
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
|
||||
|
11
tests/src/fsfw_tests/unit/tmtcpacket/testCcsds.cpp
Normal file
11
tests/src/fsfw_tests/unit/tmtcpacket/testCcsds.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
||||
|
||||
TEST_CASE( "CCSDS Test" , "[ccsds]") {
|
||||
REQUIRE(spacepacket::getTcSpacePacketIdFromApid(0x22) == 0x1822);
|
||||
REQUIRE(spacepacket::getTmSpacePacketIdFromApid(0x22) == 0x0822);
|
||||
|
||||
REQUIRE(spacepacket::getTcSpacePacketIdFromApid(0x7ff) == 0x1fff);
|
||||
REQUIRE(spacepacket::getTmSpacePacketIdFromApid(0x7ff) == 0xfff);
|
||||
}
|
9
tests/user/testcfg/CMakeLists.txt
Normal file
9
tests/user/testcfg/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
ipc/MissionMessageTypes.cpp
|
||||
pollingsequence/PollingSequenceFactory.cpp
|
||||
)
|
||||
|
||||
# Add include paths for the executable
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
Loading…
Reference in New Issue
Block a user