Skip to content

Commit 53c88fa

Browse files
committed
tools: remove unused code from test.py
PR-URL: #12806 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 665695f commit 53c88fa

File tree

1 file changed

+5
-44
lines changed

1 file changed

+5
-44
lines changed

tools/test.py

+5-44
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def __init__(self, cases, flaky_tests_mode):
7878
self.failed = [ ]
7979
self.flaky_failed = [ ]
8080
self.crashed = 0
81-
self.flaky_crashed = 0
8281
self.lock = threading.Lock()
8382
self.shutdown_event = threading.Event()
8483

@@ -156,8 +155,6 @@ def RunSingle(self, parallel, thread_id):
156155
if output.UnexpectedOutput():
157156
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
158157
self.flaky_failed.append(output)
159-
if output.HasCrashed():
160-
self.flaky_crashed += 1
161158
else:
162159
self.failed.append(output)
163160
if output.HasCrashed():
@@ -576,9 +573,6 @@ def UnexpectedOutput(self):
576573
outcome = PASS
577574
return not outcome in self.test.outcomes
578575

579-
def HasPreciousOutput(self):
580-
return self.UnexpectedOutput() and self.store_unexpected_output
581-
582576
def HasCrashed(self):
583577
if utils.IsWindows():
584578
return 0x80000000 & self.output.exit_code and not (0x3FFFFF00 & self.output.exit_code)
@@ -805,11 +799,6 @@ def GetName(self):
805799
return self.name
806800

807801

808-
# Use this to run several variants of the tests, e.g.:
809-
# VARIANT_FLAGS = [[], ['--always_compact', '--noflush_code']]
810-
VARIANT_FLAGS = [[]]
811-
812-
813802
class TestRepository(TestSuite):
814803

815804
def __init__(self, path):
@@ -828,10 +817,6 @@ def GetConfiguration(self, context):
828817
(file, pathname, description) = imp.find_module('testcfg', [ self.path ])
829818
module = imp.load_module('testcfg', file, pathname, description)
830819
self.config = module.GetConfiguration(context, self.path)
831-
if hasattr(self.config, 'additional_flags'):
832-
self.config.additional_flags += context.node_args
833-
else:
834-
self.config.additional_flags = context.node_args
835820
finally:
836821
if file:
837822
file.close()
@@ -841,13 +826,11 @@ def GetBuildRequirements(self, path, context):
841826
return self.GetConfiguration(context).GetBuildRequirements()
842827

843828
def AddTestsToList(self, result, current_path, path, context, arch, mode):
844-
for v in VARIANT_FLAGS:
845-
tests = self.GetConfiguration(context).ListTests(current_path, path,
846-
arch, mode)
847-
for t in tests: t.variant_flags = v
848-
result += tests
849-
for i in range(1, context.repeat):
850-
result += copy.deepcopy(tests)
829+
tests = self.GetConfiguration(context).ListTests(current_path, path,
830+
arch, mode)
831+
result += tests
832+
for i in range(1, context.repeat):
833+
result += copy.deepcopy(tests)
851834

852835
def GetTestStatus(self, context, sections, defs):
853836
self.GetConfiguration(context).GetTestStatus(sections, defs)
@@ -883,12 +866,6 @@ def GetTestStatus(self, context, sections, defs):
883866
test.GetTestStatus(context, sections, defs)
884867

885868

886-
SUFFIX = {
887-
'debug' : '_g',
888-
'release' : '' }
889-
FLAGS = {
890-
'debug' : ['--enable-slow-asserts', '--debug-code', '--verify-heap'],
891-
'release' : []}
892869
TIMEOUT_SCALEFACTOR = {
893870
'armv6' : { 'debug' : 12, 'release' : 3 }, # The ARM buildbots are slow.
894871
'arm' : { 'debug' : 8, 'release' : 2 },
@@ -906,7 +883,6 @@ def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
906883
self.workspace = workspace
907884
self.buildspace = buildspace
908885
self.verbose = verbose
909-
self.vm_root = vm
910886
self.node_args = args
911887
self.expect_fail = expect_fail
912888
self.timeout = timeout
@@ -936,9 +912,6 @@ def GetVm(self, arch, mode):
936912

937913
return name
938914

939-
def GetVmFlags(self, testcase, mode):
940-
return testcase.variant_flags + FLAGS[mode]
941-
942915
def GetTimeout(self, mode):
943916
return self.timeout * TIMEOUT_SCALEFACTOR[ARCH_GUESS or 'ia32'][mode]
944917

@@ -1036,18 +1009,6 @@ def IsEmpty(self):
10361009
return len(self.elms) == 0
10371010

10381011

1039-
class Everything(Set):
1040-
1041-
def Intersect(self, that):
1042-
return that
1043-
1044-
def Union(self, that):
1045-
return self
1046-
1047-
def IsEmpty(self):
1048-
return False
1049-
1050-
10511012
class Nothing(Set):
10521013

10531014
def Intersect(self, that):

0 commit comments

Comments
 (0)