[+] Missing adapter print test

This commit is contained in:
Reece Wilson 2023-08-27 20:32:24 +01:00
parent 160a6f7136
commit 618f1cd2a0
3 changed files with 29 additions and 2 deletions

@ -1 +1 @@
Subproject commit 5cf7533eaba96acbf5d0641bdc07bd2619172d44
Subproject commit 55c02d4aa020a8cd21d1f793ffb6080b33f3474f

View File

@ -473,6 +473,33 @@ TEST(Resolve, GoogleAAAA)
}
}
TEST(Adapters, Print)
{
auto pNetProcessor = AuNet::NewNetworkInterface();
ASSERT_TRUE(bool(pNetProcessor));
AuLogInfo("Hostname: {}", pNetProcessor->GetInterfacesService()->GetHostname());
auto ifaces = pNetProcessor->GetInterfacesService()->GetAdapters();
for (const auto &pAdapter : ifaces)
{
AuString dns = "";
for (const auto &dnsIP : pAdapter->GetDNS())
{
dns += fmt::format(" dns-server={}", dnsIP.ToString());
}
AuLogInfo("Found adapter interface (family: {}): \n\tName: {}\n\tDevice: {}\n\tAddress: {}\n\tMulticast: {}\n\tGateway: {}\n\tDNS: {}\n\n",
AuNet::EIPProtocolToString(pAdapter->ToFamily()),
pAdapter->ToName(),
pAdapter->ToDevice(),
pAdapter->ToAddress().ToString(),
pAdapter->ToBroadcastAddress().ToString(),
pAdapter->ToGateway().ToString(),
dns);
}
}
void RunTests()
{
Aurora::RuntimeStartInfo info;

View File

@ -872,7 +872,7 @@ void RunTests()
{
Aurora::RuntimeStartInfo info;
info.console.fio.bEnableLogging = false;
info.threadingConfig.uSpinLoopPowerA = 7;
info.threadingConfig.uSpinLoopPowerA = 1u << 6;
Aurora::RuntimeStart(info);
AuThreads::GetThread()->SetPriority(AuThreads::EThreadPriority::ePrioRT);