Revision 2a8b9496 test_code/ping.py

View differences:

test_code/ping.py
34 34
        info("Data folder: "+self.prefix+"\n")
35 35

  
36 36
        for h in self.getAllHosts():
37
            self.launchPing(h)
37
            if h.defaultIntf().ip != self.destination:
38
                self.launchPing(h)
38 39

  
39 40
        info("Waiting completion...\n")
40 41
        self.wait(self.duration, log_resources={'net': 'netusage.csv'})
......
46 47

  
47 48
        duration = int(args["duration"])
48 49
        super(pingRandomTest, self).__init__(mininet, duration)
49
        h =  self.getHostSample(1)
50 50
        self.destination = self.getHostSample(1)[0].defaultIntf().ip
51 51
        self.setPrefix(name)
52 52

  
53
class pingNode0Test(pingTest):
54

  
55
    def __init__(self, mininet, name, args):
56

  
57
        duration = int(args["duration"])
58
        super(pingRandomTest, self).__init__(mininet, duration)
59
        self.destination = self.net.value()[0].defaultIntf().ip
60
        self.setPrefix(name)
53 61

  

Also available in: Unified diff