123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #include "DataPathTestFixture.h"
- Pipe DataPathTestFixture::m_FromIPAPipe(IPA_CLIENT_TEST_CONS,
- IPA_TEST_CONFIGURATION_18);
- Pipe DataPathTestFixture::m_ToIpaPipe(IPA_CLIENT_TEST_PROD,
- IPA_TEST_CONFIGURATION_18);
- Pipe DataPathTestFixture::m_IpaDriverPipe(IPA_CLIENT_TEST2_PROD,
- IPA_TEST_CONFIGURATION_18);
- RoutingDriverWrapper DataPathTestFixture::m_Routing;
- Filtering DataPathTestFixture::m_Filtering;
- HeaderInsertion DataPathTestFixture::m_HeaderInsertion;
- DataPathTestFixture::DataPathTestFixture()
- {
- m_testSuiteName.push_back("DataPath");
- Register(*this);
- }
- bool DataPathTestFixture::Setup()
- {
- bool bRetVal = true;
-
- ConfigureScenario(IPA_TEST_CONFIGURATION_18);
- bRetVal &= m_ToIpaPipe.Init();
- bRetVal &= m_FromIPAPipe.Init();
- bRetVal &= m_IpaDriverPipe.Init();
- if (!m_Routing.DeviceNodeIsOpened()) {
- LOG_MSG_ERROR(
- "Routing block is not ready for immediate commands!\n");
- return false;
- }
- if (!m_Filtering.DeviceNodeIsOpened()) {
- LOG_MSG_ERROR(
- "Filtering block is not ready for immediate commands!\n");
- return false;
- }
- if (!m_HeaderInsertion.DeviceNodeIsOpened())
- {
- LOG_MSG_ERROR("Header Insertion block is not ready for immediate commands!\n");
- return false;
- }\
-
- m_HeaderInsertion.Reset();
- return bRetVal;
- }
- bool DataPathTestFixture::Teardown()
- {
-
- m_FromIPAPipe.Destroy();
- m_ToIpaPipe.Destroy();
- m_IpaDriverPipe.Destroy();
- return true;
- }
- bool DataPathTestFixture::Run()
- {
- LOG_MSG_DEBUG("Entering Function");
- if (!TestLogic()) {
- LOG_MSG_ERROR(
- "Test failed, Input and expected output mismatch.");
- return false;
- }
- LOG_MSG_DEBUG("Leaving Function (Returning True)");
- return true;
- }
|