[*] Update Process, IPC, Console, and FS test following IO refactoring in AuRuntime

This commit is contained in:
Reece Wilson 2022-05-14 19:20:26 +01:00
parent e7394e2858
commit 5974023ec2
6 changed files with 24 additions and 24 deletions

@ -1 +1 @@
Subproject commit 61f20b6c697f498db6f2b46e89830ce6ea09322d
Subproject commit 23e922a39679482d3f17fedf7ea393b7f595b723

View File

@ -65,14 +65,14 @@ TEST(Process, RunSystemLoopSourceStdOut)
auto transactionSource = transaction->NewLoopSource();
auto processDeadLoopSource = process->AsLoopSource();
auto processDeadCallback = AuMakeShared<Aurora::Loop::ILoopSourceSubscriberFunctional>([&](const AuSPtr<AuLoop::ILoopSource> &source) -> bool
auto processDeadCallback = AuMakeShared<AuLoop::ILoopSourceSubscriberFunctional>([&](const AuSPtr<AuLoop::ILoopSource> &source) -> bool
{
AuLogDbg("Exit Code [2]: 0x{:x} -> exiting", (AuUInt)process->GetExitCode());
bIsRunning = false;
return false; // dont evict
});
transaction->SetCallback(AuMakeShared<AuIOFS::IAsyncFinishedSubscriberFunctional>([&](AuUInt64 offset, AuUInt32 length)
transaction->SetCallback(AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([&](AuUInt64 offset, AuUInt32 length)
{
transaction->Reset();
@ -85,7 +85,7 @@ TEST(Process, RunSystemLoopSourceStdOut)
ASSERT_TRUE(transaction->StartRead(0, AuUnsafeRaiiToShared(&readView)));
auto loop = Aurora::Loop::NewLoopQueue();
auto loop = AuLoop::NewLoopQueue();
ASSERT_TRUE(loop->SourceAdd(transactionSource));
ASSERT_TRUE(loop->SourceAdd(processDeadLoopSource));

View File

@ -196,12 +196,12 @@ TEST(IPC, AsyncPipe)
// Set callback
transactionA->SetCallback(AuMakeShared<AuIOFS::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
transactionA->SetCallback(AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
{
AuLogDbg("IPC server callback: {} {}", offset, length);
}));
transactionB->SetCallback(AuMakeShared<AuIOFS::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
transactionB->SetCallback(AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
{
AuLogDbg("IPC client callback: {} {}", offset, length);
}));

View File

@ -11,23 +11,23 @@
static void PrintDebug()
{
AuConsole::TTYFill(' ', AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldMagenta);
AuConsole::TTYWrite("Hello Red and Blue\r\n", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBlue);
AuConsole::TTYWrite("To blank\r\n");
AuConsole::TTYWrite("Hello Red and Green\n", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBlue);
AuConsole::TTYWrite("To blank\n");
AuConsole::TTYMoveY(1);
AuConsole::TTYClearLine(AuConsole::EAnsiColor::eBoldMagenta);
AuConsole::TTYWrite("Overwritten\r\n");
AuConsole::TTYWrite("Hello Red and Blue\r\n", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Red and Blue\r\n", AuConsole::EAnsiColor::eBoldRed, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Green and Blue\r\n", AuConsole::EAnsiColor::eGreen, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Green and Blue\r\n", AuConsole::EAnsiColor::eBoldGreen, AuConsole::EAnsiColor::eBlue);
AuConsole::TTYWrite("Hello Yellow and Blue\r\n", AuConsole::EAnsiColor::eYellow, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Yellow and Blue\r\n", AuConsole::EAnsiColor::eBoldYellow, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Blue and Blue\r\n", AuConsole::EAnsiColor::eBlue, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Blue and Blue\r\n", AuConsole::EAnsiColor::eBoldBlue, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Magenta and Blue\r\n", AuConsole::EAnsiColor::eMagenta, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Magenta and Blue\r\n", AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Cyan and Blue\r\n", AuConsole::EAnsiColor::eCyan, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Cyan and Blue\r\n", AuConsole::EAnsiColor::eBoldCyan, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Overwritten\n");
AuConsole::TTYWrite("Hello Red and Green", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Red and Green\n", AuConsole::EAnsiColor::eBoldRed, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Green and Green\n", AuConsole::EAnsiColor::eGreen, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Green and Blue\n", AuConsole::EAnsiColor::eBoldGreen, AuConsole::EAnsiColor::eBlue);
AuConsole::TTYWrite("Hello Yellow and Green\n", AuConsole::EAnsiColor::eYellow, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Yellow and Green\n", AuConsole::EAnsiColor::eBoldYellow, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Blue and Green\n", AuConsole::EAnsiColor::eBlue, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Blue and Green\n", AuConsole::EAnsiColor::eBoldBlue, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Magenta and Green\n", AuConsole::EAnsiColor::eMagenta, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Magenta and Green\n", AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Cyan and Green\n", AuConsole::EAnsiColor::eCyan, AuConsole::EAnsiColor::eBoldGreen);
AuConsole::TTYWrite("Hello Bold Cyan and Green\n", AuConsole::EAnsiColor::eBoldCyan, AuConsole::EAnsiColor::eBoldGreen);
}
static void ReadStdInNonBlocking()

View File

@ -198,7 +198,7 @@ TEST(FS, Async)
auto transaction = stream->NewTransaction();
ASSERT_TRUE(bool(transaction));
transaction->SetCallback(AuMakeShared<AuIOFS::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
transaction->SetCallback(AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
{
AuLogDbg("AIO 1 callback: {} {}", offset, length);
}));
@ -224,7 +224,7 @@ TEST(FS, AsyncAltWait)
auto transaction = stream->NewTransaction();
ASSERT_TRUE(bool(transaction));
transaction->SetCallback(AuMakeShared<AuIOFS::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
transaction->SetCallback(AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([](AuUInt64 offset, AuUInt32 length)
{
AuLogDbg("AIO 2 callback: {} {}", offset, length);
}));

@ -1 +1 @@
Subproject commit 80600e56cc9afe7ee02737429f9177aa87025054
Subproject commit 8a011b8a38b7748d1a3eaf1e99c8b859d754d060