Skip to content

Commit

Permalink
move Configuration manager test logging to printf
Browse files Browse the repository at this point in the history
  • Loading branch information
msandstedt committed Jun 6, 2022
1 parent aa89c3d commit 8105df9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/platform/tests/TestConfigurationMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void TestConfigurationMgr_FirmwareBuildTime(nlTestSuite * inSuite, void *
System::Clock::Seconds32 chipEpochTime;
NL_TEST_ASSERT(inSuite, ConfigurationMgr().GetFirmwareBuildChipEpochTime(chipEpochTime) == CHIP_NO_ERROR);

ChipLogProgress(TimeService, "Configuration Manager reported CHIP epoch build time: %" PRIu32, chipEpochTime.count());
printf("Configuration Manager reported CHIP epoch build time: %" PRIu32 "\n", chipEpochTime.count());

char date[14]; // strlen("Jan 000 00000") == 13
char timeOfDay[12]; // strlen("000:000:000") == 11
Expand All @@ -251,7 +251,7 @@ static void TestConfigurationMgr_FirmwareBuildTime(nlTestSuite * inSuite, void *
NL_TEST_ASSERT(inSuite, printed > 0 && printed < static_cast<int>(sizeof(timeOfDay)));
}

ChipLogProgress(TimeService, "Recomputation to build date / time: %s %s", date, timeOfDay);
printf("Recomputation to build date / time: %s %s\n", date, timeOfDay);

// Read the hard-coded build date / time strings that the configuration
// manager used to compute firmware build CHIP epoch time.
Expand All @@ -260,7 +260,7 @@ static void TestConfigurationMgr_FirmwareBuildTime(nlTestSuite * inSuite, void *
NL_TEST_ASSERT(inSuite, ConfigurationMgr().GetHardCodedFirmwareBuildDate(&expectedDate) == CHIP_NO_ERROR);
NL_TEST_ASSERT(inSuite, ConfigurationMgr().GetHardCodedFirmwareBuildTimeOfDay(&expectedTimeOfDay) == CHIP_NO_ERROR);

ChipLogProgress(TimeService, "Expected date / time: %s %s", expectedDate, expectedTimeOfDay);
printf("Expected date / time: %s %s\n", expectedDate, expectedTimeOfDay);

// Compare the strings. If they are identical, this means the configuration
// manager's parser for the __DATE__ / __TIME__ strings worked for the
Expand Down

0 comments on commit 8105df9

Please sign in to comment.