Big refactoring of proxy code.
[nepi.git] / test / testbeds / ns3 / integration.py
index f0926da..d4a7a4c 100755 (executable)
@@ -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()