utils/ABITest: Add option to skip individual tests by index.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-09-27 20:13:17 +00:00
Родитель e830a36053
Коммит 1ca717b766
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -356,6 +356,9 @@ def main():
parser.add_option("", "--use-random-seed", dest="useRandomSeed",
help="use random value for initial random number generator seed",
action='store_true', default=False)
parser.add_option("", "--skip", dest="skipTests",
help="add a test index to skip",
type=int, action='append', default=[])
parser.add_option("-o", "--output", dest="output", metavar="FILE",
help="write output to FILE [default %default]",
type=str, default='-')
@ -639,11 +642,14 @@ def main():
if args:
[write(int(a)) for a in args]
skipTests = set(opts.skipTests)
for i in range(opts.count):
if opts.mode=='linear':
index = opts.minIndex + i
else:
index = opts.minIndex + int((opts.maxIndex-opts.minIndex) * random.random())
if index in skipTests:
continue
write(index)
P.finish()