X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Ftestbeds%2Fns3%2Fintegration.py;h=d4a7a4cdcd4d419724d4e3d5f8828769a19f02fb;hb=d085eb3f8991a3475359a57fb13a84335e072832;hp=f0926da939a7439e5a91fa6562c3f0fe18e961ed;hpb=585fce393285fe63fbff43c1274a401e9e863c17;p=nepi.git diff --git a/test/testbeds/ns3/integration.py b/test/testbeds/ns3/integration.py index f0926da9..d4a7a4cd 100755 --- a/test/testbeds/ns3/integration.py +++ b/test/testbeds/ns3/integration.py @@ -74,7 +74,8 @@ class Ns3IntegrationTestCase(unittest.TestCase): time.sleep(0.5) ping_result = controller.trace(ns3_desc.guid, iface2.guid, "P2PAsciiTrace") comp_result = "- 19.021 /NodeList/1/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Dequeue ns3::PppHeader (Point-to-Point Protocol: IP (0x0021)) ns3::Ipv4Header (tos 0x0 ttl 64 id 19 protocol 1 offset 0 flags [none] length: 84 10.0.0.2 > 10.0.0.1) ns3::Icmpv4Header (type=0, code=0) ns3::Icmpv4Echo (identifier=0, sequence=19)" - self.assertNotEqual(ping_result.find(comp_result), -1) + if ping_result.find(comp_result) == -1: + self.fail("Unexpected trace: %s" % (ping_result,)) controller.stop() controller.shutdown() @@ -147,7 +148,8 @@ class Ns3IntegrationTestCase(unittest.TestCase): ping_result = controller.trace(ns3_desc.guid, iface2.guid, "P2PAsciiTrace") comp_result = "- 19.021 /NodeList/1/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Dequeue ns3::PppHeader (Point-to-Point Protocol: IP (0x0021)) ns3::Ipv4Header (tos 0x0 ttl 64 id 19 protocol 1 offset 0 flags [none] length: 84 10.0.0.2 > 10.0.0.1) ns3::Icmpv4Header (type=0, code=0) ns3::Icmpv4Echo (identifier=0, sequence=19)" - self.assertNotEqual(ping_result.find(comp_result), -1) + if ping_result.find(comp_result) == -1: + self.fail("Unexpected trace: %s" % (ping_result,)) controller.stop() controller.shutdown()