From f80484576856564ebf6cc9874d7921366c0a9f8a Mon Sep 17 00:00:00 2001 From: Tove Rumar Date: Tue, 9 Apr 2024 15:44:33 +0200 Subject: [PATCH 1/3] Unity: Update submodule ref to v2.6.0 Update Unity submodule to include latest changes. This particular update is needed for a breaking change in Ruby versions whth Psych 4.0 and up --- vendor/unity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/unity b/vendor/unity index 287e076962..860062d51b 160000 --- a/vendor/unity +++ b/vendor/unity @@ -1 +1 @@ -Subproject commit 287e076962ec711cd2bdf08364a8df9ce51e106b +Subproject commit 860062d51b2e8a75d150337b63ca2a472840d13c From 7b1dc99f90bf1731a88e8696e055e693e039d9cc Mon Sep 17 00:00:00 2001 From: Tove Rumar Date: Tue, 9 Apr 2024 15:46:06 +0200 Subject: [PATCH 2/3] rakefile_helper: Update yaml load api to helper from unity This is needed due to a breaking change in Ruby versions with Psych 4.0 or later --- tools/test/rakefile_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/rakefile_helper.rb b/tools/test/rakefile_helper.rb index 6dc4f47694..6c9956dff4 100644 --- a/tools/test/rakefile_helper.rb +++ b/tools/test/rakefile_helper.rb @@ -1,8 +1,8 @@ -require 'yaml' require 'fileutils' require './vendor/unity/auto/unity_test_summary' require './vendor/unity/auto/generate_test_runner' require './vendor/unity/auto/colour_reporter' +require './vendor/unity/auto/yaml_helper' module RakefileHelpers @@ -10,7 +10,7 @@ module RakefileHelpers def load_configuration(config_file) $cfg_file = config_file - $cfg = YAML.load(File.read($cfg_file)) + $cfg = YamlHelper.load_file($cfg_file) $colour_output = false unless $cfg['colour'] end From ced8fdd6f2bb435bc4fc58dee67c113653f6c4d2 Mon Sep 17 00:00:00 2001 From: Tove Rumar Date: Tue, 9 Apr 2024 15:55:09 +0200 Subject: [PATCH 3/3] UnitTests: Accomodate for change in Unity. --- test/deck/core/test_deck_memory.c | 8 ++++---- test/modules/src/lighthouse/test_lighthouse_core.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/deck/core/test_deck_memory.c b/test/deck/core/test_deck_memory.c index bd8af5a5f9..bda4a0b4a6 100644 --- a/test/deck/core/test_deck_memory.c +++ b/test/deck/core/test_deck_memory.c @@ -541,7 +541,7 @@ void testReadFromPrimaryDeckMemory() { TEST_ASSERT_TRUE(read_isCalled); TEST_ASSERT_EQUAL_UINT32(100, read_vAddr); TEST_ASSERT_EQUAL_UINT8(30, read_len); - TEST_ASSERT_TRUE(actual) + TEST_ASSERT_TRUE(actual); } void testReadFromSecondaryDeckMemory() { @@ -559,7 +559,7 @@ void testReadFromSecondaryDeckMemory() { TEST_ASSERT_TRUE(read_isCalled); TEST_ASSERT_EQUAL_UINT32(100, read_vAddr); TEST_ASSERT_EQUAL_UINT8(30, read_len); - TEST_ASSERT_TRUE(actual) + TEST_ASSERT_TRUE(actual); } void testReadFromDeckWithoutReadFunction() { @@ -603,7 +603,7 @@ void testWriteToPrimaryDeckMemory() { TEST_ASSERT_TRUE(write_isCalled); TEST_ASSERT_EQUAL_UINT32(100, write_vAddr); TEST_ASSERT_EQUAL_UINT8(30, write_len); - TEST_ASSERT_TRUE(actual) + TEST_ASSERT_TRUE(actual); } void testWriteToSecondaryDeckMemory() { @@ -621,7 +621,7 @@ void testWriteToSecondaryDeckMemory() { TEST_ASSERT_TRUE(write_isCalled); TEST_ASSERT_EQUAL_UINT32(100, write_vAddr); TEST_ASSERT_EQUAL_UINT8(30, write_len); - TEST_ASSERT_TRUE(actual) + TEST_ASSERT_TRUE(actual); } void testWriteToSecondaryDeckMemoryPassesInMemDef() { diff --git a/test/modules/src/lighthouse/test_lighthouse_core.c b/test/modules/src/lighthouse/test_lighthouse_core.c index 20dece4dff..9430dbfdef 100644 --- a/test/modules/src/lighthouse/test_lighthouse_core.c +++ b/test/modules/src/lighthouse/test_lighthouse_core.c @@ -168,7 +168,7 @@ void testThatOffsetIsDecodedInUartFrame() { TEST_ASSERT_EQUAL_UINT32(expected, actual); // Verify the padding data was not affected - TEST_ASSERT_TRUE(frameOk) + TEST_ASSERT_TRUE(frameOk); } @@ -187,7 +187,7 @@ void testThatBeamDataIsDecodedInUartFrame() { TEST_ASSERT_EQUAL_UINT32(expected, actual); // Verify the padding data was not affected - TEST_ASSERT_TRUE(frameOk) + TEST_ASSERT_TRUE(frameOk); } void testThatSensorIsDecodedInUartFrame() {