Revision 0597ba9b test_generic.py

View differences:

test_generic.py
14 14
        self.duration = duration
15 15
        self.prefix = ''
16 16
    
17
    def getHostSample(self,num):
18
        hosts = sample(self.net.values(),num)
17
    def getHostSample(self, num):
18
        hosts = sample(self.net.values(), num)
19 19
        return hosts[:num]
20 20

  
21
    def getAllHosts(self):
22
        return self.net.values()
23

  
21 24
    def bgCmd(self,host,force_multiple_processes,*args):
22 25
        # here it's a little workaround for tracing the resulting pid
23 26
        # it launch the new process using the mininet interface
......
53 56
        self.pendingProc.clear()
54 57

  
55 58
    def setPrefix(self, name):
56
        self.prefix = str(name) + '_' + str(self.duration) + '_' + \
57
                str(len(self.hosts)+1) + 'hosts/' 
59
        self.prefix = str(name) + '_' + str(self.duration) + '/'
58 60
        if not os.path.exists(self.prefix):
59 61
                os.makedirs(self.prefix)
60 62

  
......
65 67
                os.chmod(os.path.join(root, dir), 0777)
66 68
            for file in files:
67 69
                os.chmod(os.path.join(root, file), 0777)
68
                print "XX", file
69 70

  

Also available in: Unified diff