From c5c5f8754c88c563047059804cc9e78a5779f266 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 16 Jan 2020 09:15:44 +0100 Subject: [PATCH] test-init: add test to check for affinity warning Issue #1412 --- .../os/recipes/raw/test-init/test-init.config | 20 +++++++++++++++++++ repos/os/src/test/init/main.cc | 9 +++++++++ 2 files changed, 29 insertions(+) diff --git a/repos/os/recipes/raw/test-init/test-init.config b/repos/os/recipes/raw/test-init/test-init.config index b33b5bc7c..c744cd9f9 100644 --- a/repos/os/recipes/raw/test-init/test-init.config +++ b/repos/os/recipes/raw/test-init/test-init.config @@ -1521,6 +1521,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/repos/os/src/test/init/main.cc b/repos/os/src/test/init/main.cc index 488df11a4..c6a3f697e 100644 --- a/repos/os/src/test/init/main.cc +++ b/repos/os/src/test/init/main.cc @@ -250,6 +250,15 @@ struct Test::Main : Log_message_handler _expect_log = true; return; } + if (step.type() == "expect_warning") { + _expect_log_msg = _curr_step_xml().attribute_value("string", Log_message_handler::Message()); + Log_message_handler::Message colored (_curr_step_xml().attribute_value("colored", Log_message_handler::Message())); + _expect_log_msg = Log_message_handler::Message(_expect_log_msg, + "\033[34m", + colored); + _expect_log = true; + return; + } if (step.type() == "expect_init_state") { if (xml_matches(step, _init_state.xml())) {