1''' 2 Access Control Lists stressing script 3 To lauch on the first client 4 Aurelien Charbon - Bull SA 5''' 6 7from random_gen import * 8from optparse import OptionParser 9import commands 10import os 11import random 12 13alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-()' 14t_alphabet=len(alphabet) 15 16test = RandomGen() 17 18parser = OptionParser() 19parser.set_defaults(nbfiles=5,nbusers=5,nbgroups=5,nloop=100 ) 20parser.add_option("-n","--nloop", dest="nloop",type="int", help="number of loop to do in the test") 21parser.add_option("-p", "--path", dest="path",help="path on which the test is executed") 22parser.add_option("-f", "--nbfiles", dest="nbfiles",type="int",help="nb of files to do the test (default=5)") 23parser.add_option("-u", "--nbusers", dest="nbusers",type="int",help="nb of users (default=5)") 24parser.add_option("-g", "--nbgrp", dest="nbgroups",type="int",help="nb of groups (default=5)") 25(options, args) = parser.parse_args() 26 27test.createFile(options.path,options.nbfiles) 28test.getNUserList(options.nbusers) 29test.getNGroupList(options.nbgroups) 30for i in range (options.nloop): 31 test.randomOp(options.path) 32