corrected use of variants

This commit is contained in:
Martin Diehl 2014-06-03 17:19:56 +00:00
parent e9faee565c
commit 27ffa658b6
1 changed files with 2 additions and 3 deletions

View File

@ -38,15 +38,14 @@ class Test():
Run all variants and report first failure. Run all variants and report first failure.
''' '''
if not self.testPossible(): return -1 if not self.testPossible(): return -1
if len(variants) == 0: variants = xrange(len(self.variants)) # iterate over all variants
self.clean() self.clean()
self.prepareAll() self.prepareAll()
for variant in variants: for variant in xrange(len(self.variants)):
try: try:
self.prepare(variant) self.prepare(variant)
self.run(variant) self.run(variant)
self.postprocess(variant) self.postprocess(variant)
if options.update: # update requested if self.options.update: # update requested
self.update(variant) self.update(variant)
elif not self.compare(variant): # no update, do comparison elif not self.compare(variant): # no update, do comparison
return variant+1 # return culprit return variant+1 # return culprit