Lines Matching refs:opts
480 (opts, args) = parser.parse_args()
482 if not opts.useRandomSeed:
483 random.seed(opts.seed)
487 if opts.useBuiltins:
489 if opts.useChar: ints.append(('char',1))
490 if opts.useShort: ints.append(('short',2))
491 if opts.useInt: ints.append(('int',4))
493 if opts.useLong: ints.append(('long',4))
494 if opts.useLongLong: ints.append(('long long',8))
495 if opts.useUnsigned:
500 if opts.useBool: builtins.append(('_Bool',1))
501 if opts.useFloat: builtins.append(('float',4))
502 if opts.useDouble: builtins.append(('double',8))
503 if opts.useLongDouble: builtins.append(('long double',16))
505 if opts.useVoidPointer: builtins.append(('void*',4))
510 for specifier in opts.bitFields.split(','):
529 if useBitField and opts.useBitField:
531 if useRecord and opts.useRecord:
533 atg.addGenerator(RecordTypeGenerator(subfieldgen, opts.recordUseUnion,
534 opts.recordMaxSize))
535 if opts.useComplex:
538 if useArray and opts.useArray:
540 atg.addGenerator(ArrayTypeGenerator(subgen, opts.arrayMaxSize))
541 if opts.useVector:
543 for i,t in enumerate(opts.vectorTypes.split(',')):
561 if opts.useEnum:
564 if opts.recordMaxDepth is None:
579 for i in range(opts.recordMaxDepth):
589 if opts.testLayout:
592 ftg = FunctionTypeGenerator(atg, opts.functionUseReturn, opts.functionMaxArgs)
595 if opts.maxIndex is None:
597 opts.maxIndex = 10000000
599 opts.maxIndex = ftg.cardinality
600 opts.maxIndex = min(opts.maxIndex, ftg.cardinality)
601 opts.minIndex = max(0,min(opts.maxIndex-1, opts.minIndex))
602 if not opts.mode=='random':
603 opts.count = min(opts.count, opts.maxIndex-opts.minIndex)
605 if opts.output=='-':
608 output = open(opts.output,'w')
612 if opts.outputHeader:
613 outputHeader = open(opts.outputHeader,'w')
617 if opts.outputTests:
618 outputTests = open(opts.outputTests,'w')
622 if opts.outputDriver:
623 outputDriver = open(opts.outputDriver,'w')
632 if opts.testLayout:
639 headerName=opts.outputHeader,
650 if opts.testLayout:
658 skipTests = set(opts.skipTests)
659 for i in range(opts.count):
660 if opts.mode=='linear':
661 index = opts.minIndex + i
663 index = opts.minIndex + int((opts.maxIndex-opts.minIndex) * random.random())