From a947f10fd826aa0dd86b0c994a72b8dbaafc08c3 Mon Sep 17 00:00:00 2001 From: cesaaargm Date: Sat, 27 Jul 2024 19:14:13 +0200 Subject: [PATCH] [TAS-246] [TEST] CI/CD set up - more fixes --- src/core/libs/osnma_msg_receiver.h | 1 + .../signal-processing-blocks/osnma/gnss_crypto_test.cc | 2 +- .../osnma/osnma_msg_receiver_test.cc | 8 +++----- .../signal-processing-blocks/osnma/osnma_test_vectors.cc | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/core/libs/osnma_msg_receiver.h b/src/core/libs/osnma_msg_receiver.h index 15abc632d..78f949ab4 100644 --- a/src/core/libs/osnma_msg_receiver.h +++ b/src/core/libs/osnma_msg_receiver.h @@ -37,6 +37,7 @@ #include // for std::shared_ptr #include // for std::string #include // for std::vector +#include // for std::pair /** \addtogroup Core * \{ */ diff --git a/src/tests/unit-tests/signal-processing-blocks/osnma/gnss_crypto_test.cc b/src/tests/unit-tests/signal-processing-blocks/osnma/gnss_crypto_test.cc index 4f9a75690..2d7355fd7 100644 --- a/src/tests/unit-tests/signal-processing-blocks/osnma/gnss_crypto_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/osnma/gnss_crypto_test.cc @@ -84,7 +84,7 @@ TEST(GnssCryptoTest, VerifyPublicKeyStorage) ASSERT_TRUE(result); - auto d_crypto2 = std::make_unique(f1, "", ""); + auto d_crypto2 = std::make_unique(f1, ""); bool result2 = d_crypto2->store_public_key(f2); ASSERT_TRUE(result2); diff --git a/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc b/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc index a9d6e60c5..70e060cf9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc @@ -42,14 +42,14 @@ protected: uint32_t d_GST_SIS{}; uint32_t TOW{}; uint32_t WN{}; - std::tm GST_START_EPOCH = {0, 0, 0, 22, 8 - 1, 1999 - 1900, 0}; // months start with 0 and years since 1900 in std::tm + std::tm GST_START_EPOCH = {0, 0, 0, 22, 8 - 1, 1999 - 1900, 0, 0, 0, 0, 0}; // months start with 0 and years since 1900 in std::tm const uint32_t LEAP_SECONDS = 0; // 13 + 5; void set_time(std::tm& input); void SetUp() override { - // std::tm input_time = {0, 0, 5, 16, 8 - 1, 2023 - 1900, 0}; // conf. 1 - std::tm input_time = {0, 0, 0, 27, 7 - 1, 2023 - 1900, 0}; // conf. 2 + // std::tm input_time = {0, 0, 5, 16, 8 - 1, 2023 - 1900, 0, 0, 0, 0, 0}; // conf. 1 + std::tm input_time = {0, 0, 0, 27, 7 - 1, 2023 - 1900, 0, 0, 0, 0, 0}; // conf. 2 set_time(input_time); osnma = osnma_msg_receiver_make(CRTFILE_DEFAULT, MERKLEFILE_DEFAULT); } @@ -218,8 +218,6 @@ TEST_F(OsnmaMsgReceiverTest, TagVerification) // Assert // Tag3 - uint32_t TOW_Tag3 = 345660; - uint32_t TOW_NavData_Tag3 = TOW_Tag3 - 30; uint32_t TOW_Key_Tag3 = TOW_Tag0 + 30; WN = 1248; PRNa = 2; diff --git a/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_test_vectors.cc b/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_test_vectors.cc index 31da16907..3f711f7d8 100644 --- a/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_test_vectors.cc +++ b/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_test_vectors.cc @@ -55,18 +55,18 @@ protected: uint32_t d_GST_SIS{}; uint32_t TOW{}; uint32_t WN{}; - std::tm GST_START_EPOCH = {0, 0, 0, 22, 8 - 1, 1999 - 1900, 0}; // months start with 0 and years since 1900 in std::tm + std::tm GST_START_EPOCH = {0, 0, 0, 22, 8 - 1, 1999 - 1900, 0, 0, 0, 0, 0}; // months start with 0 and years since 1900 in std::tm const uint32_t LEAP_SECONDS = 0; // 13 + 5; void set_time(std::tm& input); void SetUp() override { - // std::tm input_time = {0, 0, 5, 16, 8 - 1, 2023 - 1900, 0}; // conf. 1 - std::tm input_time = {0, 0, 0, 27, 7 - 1, 2023 - 1900, 0}; // conf. 2 + // std::tm input_time = {0, 0, 5, 16, 8 - 1, 2023 - 1900, 0, 0, 0, 0, 0}; // conf. 1 + std::tm input_time = {0, 0, 0, 27, 7 - 1, 2023 - 1900, 0, 0, 0, 0, 0}; // conf. 2 set_time(input_time); std::string crtFilePath = std::string(BASE_OSNMA_TEST_VECTORS) + "cryptographic_material/Merkle_tree_2/PublicKey/OSNMA_PublicKey_20230720113300_newPKID_2.crt"; // conf. 2 std::string merkleFilePath = std::string(BASE_OSNMA_TEST_VECTORS) + "cryptographic_material/Merkle_tree_2/MerkleTree/OSNMA_MerkleTree_20230720113300_newPKID_2.xml"; - osnma = osnma_msg_receiver_make(crtFilePath, merkleFilePath, ""); + osnma = osnma_msg_receiver_make(crtFilePath, merkleFilePath); } };