Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,7 @@ def AddTestsToList(self, result, current_path, path, context, arch, mode):
tests = self.GetConfiguration(context).ListTests(current_path, path,
arch, mode)
for t in tests: t.variant_flags = v
result += tests

result += tests * context.repeat

def GetTestStatus(self, context, sections, defs):
self.GetConfiguration(context).GetTestStatus(sections, defs)
Expand Down Expand Up @@ -780,7 +779,8 @@ def GetTestStatus(self, context, sections, defs):
class Context(object):

def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
timeout, processor, suppress_dialogs, store_unexpected_output):
timeout, processor, suppress_dialogs,
store_unexpected_output, repeat):
self.workspace = workspace
self.buildspace = buildspace
self.verbose = verbose
Expand All @@ -791,6 +791,7 @@ def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
self.processor = processor
self.suppress_dialogs = suppress_dialogs
self.store_unexpected_output = store_unexpected_output
self.repeat = repeat

def GetVm(self, arch, mode):
if arch == 'none':
Expand Down Expand Up @@ -1324,6 +1325,9 @@ def BuildOptions():
default="")
result.add_option('--temp-dir',
help='Optional path to change directory used for tests', default=False)
result.add_option('--repeat',
help='how many times to repeat each test',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be written as "Number of times to repeat given tests"

default=1, type="int")
return result


Expand Down Expand Up @@ -1489,7 +1493,8 @@ def Main():
options.timeout,
processor,
options.suppress_dialogs,
options.store_unexpected_output)
options.store_unexpected_output,
options.repeat)
# First build the required targets
if not options.no_build:
reqs = [ ]
Expand Down