| 98 | } |
| 99 | |
| 100 | void ChannelLinter::Process() |
| 101 | { |
| 102 | std::shared_ptr<MockDeviceBridge> channel; |
| 103 | if (m_Config.ShouldCreateChannel()) |
| 104 | { |
| 105 | std::cout << "Creating channel ... " << std::flush; |
| 106 | channel = MakeChannel(*m_Config.m_ChannelArguments); |
| 107 | std::cout << "OK" << std::endl; |
| 108 | } |
| 109 | |
| 110 | if (m_Config.m_TestChannelIO) |
| 111 | { |
| 112 | assert(channel); // First channel should already be created |
| 113 | std::cout << "Creating complementary channel ... " << std::flush; |
| 114 | auto complementaryArgs = GetComplementaryChannelArgs(); |
| 115 | auto complementaryChannel = MakeChannel(complementaryArgs); |
| 116 | assert(complementaryChannel); |
| 117 | std::cout << "OK" << std::endl; |
| 118 | |
| 119 | TestChannelIO(*channel.get(), *complementaryChannel.get(), m_Config.m_OverlappedIO); |
| 120 | } |
| 121 | |
| 122 | if (m_Config.m_Command) |
| 123 | { |
| 124 | assert(channel); // First channel should already be created |
| 125 | TestCommand(channel); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | std::shared_ptr<FSecure::C3::Linter::MockDeviceBridge> ChannelLinter::MakeChannel(StringVector const& channnelArguments) const |
| 130 | { |
no test coverage detected