diff options
author | Aleksandar Donchev <Aleksander.Donchev@partner.bmw.de> | 2015-06-02 10:57:57 +0200 |
---|---|---|
committer | Aleksandar Donchev <Aleksander.Donchev@partner.bmw.de> | 2015-06-02 10:57:57 +0200 |
commit | 02987671e5335cb767e0a0c64391dd44dec9e737 (patch) | |
tree | 3387e6ffe038b683e5c05c921688f6cb70390296 /AudioManagerDaemon/test | |
parent | ea0a30e1fa93d2ac79749c669a36d59e1bac2ab5 (diff) | |
download | audiomanager-02987671e5335cb767e0a0c64391dd44dec9e737.tar.gz |
* Common-API 3 integration and fix for the asserts order in the router tests.
Signed-off-by: Christian Linke <christian.linke@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/test')
6 files changed, 136 insertions, 118 deletions
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp index 9bb95e2..d9e0fd0 100644 --- a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp +++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp @@ -49,7 +49,8 @@ CAmNodeStateCommunicatorTest::~CAmNodeStateCommunicatorTest() */ void* nsmThread (void*) { - system("python nsm.py"); + if(-1 == system("python nsm.py")) + logError("Something went wrong with nsm.py!"); return (NULL); } diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt index 018d71a..9c2d1a2 100644 --- a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt @@ -22,7 +22,6 @@ project(AmNodeStateCommunicatorCAPITest) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1") find_package(Threads) -find_package(CommonAPI REQUIRED) find_package(PythonLibs REQUIRED) set (AM_LINK_LIBS @@ -43,9 +42,11 @@ INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${GOOGLE_TEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} - ${COMMON_API_INCLUDE_DIRS} - ${COMMON_API_DBUS_INCLUDE_DIRS} + ${COMMONAPI_DBUS_INCLUDE_DIRS} + ${COMMONAPI_INCLUDE_DIRS} ${COMMON_API_GEN_INCLUDE_DIR} + ${DBUS_ARCH_INCLUDE_DIR} + ${DBUS_INCLUDE_DIR} ) if(WITH_DLT) @@ -77,8 +78,9 @@ TARGET_LINK_LIBRARIES(AmNodeStateCommunicatorCAPITest ${AM_LINK_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${PYTHON_LIBRARY} - ${COMMON_API_LIBRARIES} - ${COMMON_API_DBUS_LIBRARIES} + ${CommonAPI-DBus_LIBRARY} + ${CommonAPI_LIBRARY} + ${DBUS_LIBRARY} gtest gmock ) @@ -106,6 +108,7 @@ if(USE_BUILD_LIBS) COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/org.genivi.NodeStateManager.Consumer.xml" ${EXECUTABLE_OUTPUT_PATH}/org.genivi.NodeStateManager.Consumer.xml COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/nsm.py" ${EXECUTABLE_OUTPUT_PATH}/nsm.py COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/send2nsm.py" ${EXECUTABLE_OUTPUT_PATH}/send2nsm.py - COMMAND cp "${AUDIOMANAGER_DAEMON_FOLDER}/fidls/NodeStateManager_dbus.conf" ${EXECUTABLE_OUTPUT_PATH}/AmNodeStateCommunicatorCAPITest_dbus.conf) +# COMMAND cp "${AUDIOMANAGER_DAEMON_FOLDER}/fidls/NodeStateManager_dbus.conf" ${EXECUTABLE_OUTPUT_PATH}/AmNodeStateCommunicatorCAPITest_dbus.conf + ) endif(USE_BUILD_LIBS) diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py index 74dae54..c648484 100644 --- a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py +++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py @@ -31,7 +31,7 @@ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) class NodeStateManager(dbus.service.Object): def __init__(self, loop): - busName = dbus.service.BusName('org.genivi.NodeStateManager', bus = dbus.SessionBus()) + busName = dbus.service.BusName('org.genivi.NodeStateManager.Consumer_org.genivi.NodeStateManager', bus = dbus.SessionBus()) dbus.service.Object.__init__(self, busName, '/org/genivi/NodeStateManager') self.properties = {'RestartReason': 1, 'ShutdownReason': 2, 'WakeUpReason' :3, 'BootMode' :4} self.ABus="" @@ -40,140 +40,140 @@ class NodeStateManager(dbus.service.Object): @dbus.service.method(dbus_interface='org.freedesktop.DBus.Introspectable', out_signature = 's') def Introspect(self): - f = open('org.genivi.NodeStateManager.Consumer.xml', "r") - text = f.read() - return text + f = open('org.genivi.NodeStateManager.Consumer.xml', "r") + text = f.read() + return text @dbus.service.method(dbus_interface='org.genivi.NodeStateManager.Consumer', out_signature = 'ii') def GetNodeState(self): - NodeStateId=1 - ErrorCode=1 - print('[-----nsm-----] send out nodeState' + str(NodeStateId) + ' ErrorCode '+ str(1)) - return NodeStateId, ErrorCode - + NodeStateId=1 + ErrorCode=1 + print('[-----nsm-----] send out nodeState' + str(NodeStateId) + ' ErrorCode '+ str(1)) + return NodeStateId, ErrorCode + @dbus.service.method('org.genivi.NodeStateManager.Consumer', out_signature = 'ii') def GetApplicationMode(self): - ApplicationModeId=5 - ErrorCode=2 - print('[-----nsm-----] send out ApplicationMode' + str(ApplicationModeId) + ' ErrorCode '+ str(2)) - return ApplicationModeId, ErrorCode + ApplicationModeId=5 + ErrorCode=2 + print('[-----nsm-----] send out ApplicationMode' + str(ApplicationModeId) + ' ErrorCode '+ str(2)) + return ApplicationModeId, ErrorCode @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='si', out_signature = 'ii') def GetSessionState(self,SessionName,seatID): - SessionState=0 - ErrorCode=2 - - if SessionName=="mySession" and seatID==1: - SessionState=5 - ErrorCode=1 - - print('[-----nsm-----] GetSessionState for session ' + SessionName + ' seatID '+ str(seatID) + ' returnState ' + str (SessionState)) - return SessionState, ErrorCode - + SessionState=0 + ErrorCode=2 + + if SessionName=="mySession" and seatID==1: + SessionState=5 + ErrorCode=1 + + print('[-----nsm-----] GetSessionState for session ' + SessionName + ' seatID '+ str(seatID) + ' returnState ' + str (SessionState)) + return SessionState, ErrorCode + @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='ssuu', out_signature = 'i') def RegisterShutdownClient(self,BName,ObjName,ShutdownMode,TimeoutMs): - print('[-----nsm-----] Busname: ' + BName) - print('[-----nsm-----] ObjName: ' + ObjName) - print('[-----nsm-----] ShutdownMode: ' + str(ShutdownMode)) - print('[-----nsm-----] TimeoutMs: ' + str(TimeoutMs)) - ErrorCode=1 - if TimeoutMs!=100: - ErrorCode=3 - if BName!="org.genivi.audiomanager": - ErrorCode=4 - if ShutdownMode!=1: - ErrorCode=5 - if ObjName!="/org/genivi/audiomanager/LifeCycleConsumer": - ErrorCode=6 - self.ABus=BName - self.APath=ObjName - return ErrorCode - + print('[-----nsm-----] Busname: ' + BName) + print('[-----nsm-----] ObjName: ' + ObjName) + print('[-----nsm-----] ShutdownMode: ' + str(ShutdownMode)) + print('[-----nsm-----] TimeoutMs: ' + str(TimeoutMs)) + ErrorCode=1 + if TimeoutMs!=100: + ErrorCode=3 + if BName!="org.genivi.NodeStateManager.LifeCycleConsumer_org.genivi.audiomanager": + ErrorCode=4 + if ShutdownMode!=1: + ErrorCode=5 + if ObjName!="/org/genivi/audiomanager": + ErrorCode=6 + self.ABus=BName + self.APath=ObjName + return ErrorCode + @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='ssu', out_signature = 'i') def UnRegisterShutdownClient(self,BusName,ObjName,ShutdownMode): - print('[-----nsm-----] Busname: ' + str(BusName)) - print('[-----nsm-----] ObjName: ' + str(ObjName)) - print('[-----nsm-----] ShutdownMode: ' + str(ShutdownMode)) - ErrorCode=1 - if BusName!=self.ABus: - ErrorCode=2 - if ObjName!=self.APath: - ErrorCode=2 - if ShutdownMode!=1: - ErrorCode=2 - return ErrorCode - + print('[-----nsm-----] Busname: ' + str(BusName)) + print('[-----nsm-----] ObjName: ' + str(ObjName)) + print('[-----nsm-----] ShutdownMode: ' + str(ShutdownMode)) + ErrorCode=1 + if BusName!=self.ABus: + ErrorCode=2 + if ObjName!=self.APath: + ErrorCode=2 + if ShutdownMode!=1: + ErrorCode=2 + return ErrorCode + @dbus.service.method(dbus_interface='org.genivi.NodeStateManager.Consumer', out_signature = 'u') def GetInterfaceVersion(self): - version=23 - return version - + version=23 + return version + @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='ui', out_signature='i') def LifecycleRequestComplete(self,RequestID,Status): - print('[-----nsm-----] RequestId: ' + str(RequestID)) - print('[-----nsm-----] Status: ' + str(Status)) - ErrorCode=1 - if RequestID!=22: - ErrorCode=2 - if Status!=4: - ErrorCode=2 - return ErrorCode + print('[-----nsm-----] RequestId: ' + str(RequestID)) + print('[-----nsm-----] Status: ' + str(Status)) + ErrorCode=1 + if RequestID!=22: + ErrorCode=2 + if Status!=4: + ErrorCode=2 + return ErrorCode @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') def Get(self, interface, prop): - if prop in self.properties: - print('[-----nsm-----] send out ' + str(self.properties[prop]) + ' for property '+ prop) - return self.properties[prop] - return 0 + if prop in self.properties: + print('[-----nsm-----] send out ' + str(self.properties[prop]) + ' for property '+ prop) + return self.properties[prop] + return 0 @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='ssv') def Set(self, interface, prop, value): - return 3 + return 3 @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') def GetAll(self, interface): - return self.properties - + return self.properties + @dbus.service.signal(dbus_interface='org.genivi.NodeStateManager.Consumer', signature='i') def NodeApplicationMode(self, ApplicationModeId): - print "[-----nsm-----] Send out application mode ID %d" % (ApplicationModeId) - + print "[-----nsm-----] Send out application mode ID %d" % (ApplicationModeId) + @dbus.service.signal(dbus_interface='org.genivi.NodeStateManager.Consumer', signature='i') def NodeState(self, NodeState): - print "[-----nsm-----] Send out NodeState %d" % (NodeState) - + print "[-----nsm-----] Send out NodeState %d" % (NodeState) + @dbus.service.signal(dbus_interface='org.genivi.NodeStateManager.Consumer', signature='sii') def SessionStateChanged(self, SessionStateName,SeatID,SessionState): - print "[-----nsm-----] Send out SessionStateChanged " + SessionStateName - + print "[-----nsm-----] Send out SessionStateChanged " + SessionStateName + @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='i') def sendNodeApplicationMode(self, input): - self.NodeApplicationMode(input) - return input - + self.NodeApplicationMode(input) + return input + @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='i') def sendNodeState(self, input): - self.NodeState(input) - return input - + self.NodeState(input) + return input + @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='sii') def sendSessionState(self, SessionStateName,SeatID,SessionState): - self.SessionStateChanged (SessionStateName,SeatID,SessionState) - return SeatID - + self.SessionStateChanged (SessionStateName,SeatID,SessionState) + return SeatID + @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='uu', out_signature='i') def sendLifeCycleRequest(self, request, requestID): - bus = dbus.SessionBus() - remote_object = bus.get_object(self.ABus,self.APath) - iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.LifeCycleConsumer') - iface.LifecycleRequest(request,requestID) - return 42 - + bus = dbus.SessionBus() + remote_object = bus.get_object(self.ABus,self.APath) + iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.LifeCycleConsumer') + iface.LifecycleRequest(request,requestID) + return 42 + @dbus.service.method('org.genivi.NodeStateManager.Control') def finish(self): - print '[-----nsm-----] Going to exit now!' - self.loop.quit() - return 0 + print '[-----nsm-----] Going to exit now!' + self.loop.quit() + return 0 nsm = NodeStateManager(loop) loop.run() diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py index c7e8bf5..5ed6c0c 100644 --- a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py +++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py @@ -27,31 +27,31 @@ import dbus.service def nodeState (nodeState): bus = dbus.SessionBus() - remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager') + remote_object = bus.get_object('org.genivi.NodeStateManager.Consumer_org.genivi.NodeStateManager','/org/genivi/NodeStateManager') iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control') iface.sendNodeState(int(nodeState)) def appMode (appMode): bus = dbus.SessionBus() - remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager') + remote_object = bus.get_object('org.genivi.NodeStateManager.Consumer_org.genivi.NodeStateManager','/org/genivi/NodeStateManager') iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control') iface.sendNodeApplicationMode(int(appMode)) def sessionState (SessionStateName,SeatID,SessionState): bus = dbus.SessionBus() - remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager') + remote_object = bus.get_object('org.genivi.NodeStateManager.Consumer_org.genivi.NodeStateManager','/org/genivi/NodeStateManager') iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control') iface.sendSessionState(SessionStateName,int(SeatID),int(SessionState)) def finish(): bus = dbus.SessionBus() - remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager') + remote_object = bus.get_object('org.genivi.NodeStateManager.Consumer_org.genivi.NodeStateManager','/org/genivi/NodeStateManager') iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control') iface.finish() def LifecycleRequest(Request,RequestID): bus = dbus.SessionBus() - remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager') + remote_object = bus.get_object('org.genivi.NodeStateManager.Consumer_org.genivi.NodeStateManager','/org/genivi/NodeStateManager') iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control') iface.sendLifeCycleRequest(dbus.UInt32(Request),dbus.UInt32(RequestID)) diff --git a/AudioManagerDaemon/test/AmRouterMapTest/CAmRouterMapTest.cpp b/AudioManagerDaemon/test/AmRouterMapTest/CAmRouterMapTest.cpp index b592f39..3b10f13 100644 --- a/AudioManagerDaemon/test/AmRouterMapTest/CAmRouterMapTest.cpp +++ b/AudioManagerDaemon/test/AmRouterMapTest/CAmRouterMapTest.cpp @@ -2347,13 +2347,13 @@ TEST_F(CAmRouterMapTest,route1Domain1Source3Converters1Sink) ASSERT_EQ(E_OK, pRouter.getRoute(false, source, sink, listRoutes)); ASSERT_EQ(static_cast<uint>(2), listRoutes.size()); - ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[0])); + ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[0])||pCF.compareRoute(compareRoute1,listRoutes[1])); am_Route_s compareRoute2; compareRoute2.route = listRoutingElements2; compareRoute2.sinkID = sinkID; compareRoute2.sourceID = sourceID; - ASSERT_TRUE(pCF.compareRoute(compareRoute2,listRoutes[1])); + ASSERT_TRUE(pCF.compareRoute(compareRoute2,listRoutes[1])||pCF.compareRoute(compareRoute2,listRoutes[0])); } TEST_F(CAmRouterMapTest,route2Domains1Source1Sink) @@ -2559,7 +2559,6 @@ TEST_F(CAmRouterMapTest,route3Domains1Source3Gateways3Convertres1Sink) compareRoute1.route.push_back({gwSourceID21, gwSinkID3, domainID3, CF_GENIVI_AUTO}); compareRoute1.route.push_back({gwSourceID3, gwSinkID4, domainID3, CF_GENIVI_ANALOG}); compareRoute1.route.push_back({gwSourceID4, sinkID, domainID3, CF_GENIVI_STEREO}); - ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[0])); am_Route_s compareRoute2; compareRoute2.sinkID = sinkID; @@ -2569,8 +2568,6 @@ TEST_F(CAmRouterMapTest,route3Domains1Source3Gateways3Convertres1Sink) compareRoute2.route.push_back({gwSourceID21, gwSinkID3, domainID3, CF_GENIVI_AUTO}); compareRoute2.route.push_back({gwSourceID3, gwSinkID5, domainID3, CF_GENIVI_ANALOG}); compareRoute2.route.push_back({gwSourceID5, sinkID, domainID3, CF_GENIVI_STEREO}); - ASSERT_TRUE(pCF.compareRoute(compareRoute2,listRoutes[1])); - am_Route_s compareRoute3; compareRoute3.sinkID = sinkID; @@ -2580,7 +2577,6 @@ TEST_F(CAmRouterMapTest,route3Domains1Source3Gateways3Convertres1Sink) compareRoute3.route.push_back({gwSourceID22, gwSinkID3, domainID3, CF_GENIVI_AUTO}); compareRoute3.route.push_back({gwSourceID3, gwSinkID4, domainID3, CF_GENIVI_ANALOG}); compareRoute3.route.push_back({gwSourceID4, sinkID, domainID3, CF_GENIVI_STEREO}); - ASSERT_TRUE(pCF.compareRoute(compareRoute3,listRoutes[2])); am_Route_s compareRoute4; compareRoute4.sinkID = sinkID; @@ -2590,7 +2586,23 @@ TEST_F(CAmRouterMapTest,route3Domains1Source3Gateways3Convertres1Sink) compareRoute4.route.push_back({gwSourceID22, gwSinkID3, domainID3, CF_GENIVI_AUTO}); compareRoute4.route.push_back({gwSourceID3, gwSinkID5, domainID3, CF_GENIVI_ANALOG}); compareRoute4.route.push_back({gwSourceID5, sinkID, domainID3, CF_GENIVI_STEREO}); - ASSERT_TRUE(pCF.compareRoute(compareRoute4,listRoutes[3])); + + ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[0])|| + pCF.compareRoute(compareRoute1,listRoutes[1])|| + pCF.compareRoute(compareRoute1,listRoutes[2])|| + pCF.compareRoute(compareRoute1,listRoutes[3])); + ASSERT_TRUE(pCF.compareRoute(compareRoute2,listRoutes[0])|| + pCF.compareRoute(compareRoute2,listRoutes[1])|| + pCF.compareRoute(compareRoute2,listRoutes[2])|| + pCF.compareRoute(compareRoute2,listRoutes[3])); + ASSERT_TRUE(pCF.compareRoute(compareRoute3,listRoutes[0])|| + pCF.compareRoute(compareRoute3,listRoutes[1])|| + pCF.compareRoute(compareRoute3,listRoutes[2])|| + pCF.compareRoute(compareRoute3,listRoutes[3])); + ASSERT_TRUE(pCF.compareRoute(compareRoute4,listRoutes[0])|| + pCF.compareRoute(compareRoute4,listRoutes[1])|| + pCF.compareRoute(compareRoute4,listRoutes[2])|| + pCF.compareRoute(compareRoute4,listRoutes[3])); } TEST_F(CAmRouterMapTest,routeSource1Sink2PathThroughConv1Gate1) @@ -2893,17 +2905,19 @@ TEST_F(CAmRouterMapTest, routeSource1Sink1PathThroughConv1Gate1Conv2Gate2) compareRoute1.route.push_back({gwSourceID21, coSinkID21, domainID2, CF_GENIVI_ANALOG}); compareRoute1.route.push_back({coSourceID21, gwSinkID21, domainID2, CF_GENIVI_STEREO}); compareRoute1.route.push_back({gwSourceID12, sinkID, domainID1, CF_GENIVI_AUTO}); - ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[0])); am_Route_s compareRoute2; compareRoute2.sinkID = sinkID; compareRoute2.sourceID = sourceID; compareRoute2.route.push_back({sourceID, coSinkID12, domainID1, CF_GENIVI_STEREO}); compareRoute2.route.push_back({coSourceID12, coSinkID13, domainID1, 6}); - compareRoute2.route.push_back({coSourceID13, gwSinkID21, domainID1, 5}); + compareRoute2.route.push_back({coSourceID13, gwSinkID11, domainID1, 5}); compareRoute2.route.push_back({gwSourceID21, coSinkID21, domainID2, CF_GENIVI_ANALOG}); + compareRoute2.route.push_back({coSourceID21, gwSinkID21, domainID2, CF_GENIVI_STEREO}); compareRoute2.route.push_back({gwSourceID12, sinkID, domainID1, CF_GENIVI_AUTO}); - ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[0])); + + ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[1])||pCF.compareRoute(compareRoute1,listRoutes[0])); + ASSERT_TRUE(pCF.compareRoute(compareRoute2,listRoutes[0])||pCF.compareRoute(compareRoute2,listRoutes[1])); } int main(int argc, char **argv) diff --git a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp index 36f487e..e88d54b 100644 --- a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp +++ b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp @@ -1253,8 +1253,8 @@ TEST_F(CAmRouterTest,simpleRoute4Domains2Routes) ASSERT_EQ(E_OK, pRouter.getRoute(false,sourceID,sinkID,listRoutes)); ASSERT_EQ(static_cast<uint>(2), listRoutes.size()); - ASSERT_TRUE(pCF.compareRoute(compareRoute,listRoutes[0])); - ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[1])); + ASSERT_TRUE(pCF.compareRoute(compareRoute,listRoutes[0]) || pCF.compareRoute(compareRoute,listRoutes[1]) ); + ASSERT_TRUE(pCF.compareRoute(compareRoute1,listRoutes[1]) || pCF.compareRoute(compareRoute1,listRoutes[0]) ); } //test that checks 3 domains, one sink one source but the connectionformat of third domains do not fit. |