mirror of https://github.com/nodejs/node.git
tools: remove unused code from test.py
PR-URL: https://github.com/nodejs/node/pull/12806 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
665695fbea
commit
53c88fa411
|
@ -78,7 +78,6 @@ class ProgressIndicator(object):
|
||||||
self.failed = [ ]
|
self.failed = [ ]
|
||||||
self.flaky_failed = [ ]
|
self.flaky_failed = [ ]
|
||||||
self.crashed = 0
|
self.crashed = 0
|
||||||
self.flaky_crashed = 0
|
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
self.shutdown_event = threading.Event()
|
self.shutdown_event = threading.Event()
|
||||||
|
|
||||||
|
@ -156,8 +155,6 @@ class ProgressIndicator(object):
|
||||||
if output.UnexpectedOutput():
|
if output.UnexpectedOutput():
|
||||||
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
|
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
|
||||||
self.flaky_failed.append(output)
|
self.flaky_failed.append(output)
|
||||||
if output.HasCrashed():
|
|
||||||
self.flaky_crashed += 1
|
|
||||||
else:
|
else:
|
||||||
self.failed.append(output)
|
self.failed.append(output)
|
||||||
if output.HasCrashed():
|
if output.HasCrashed():
|
||||||
|
@ -576,9 +573,6 @@ class TestOutput(object):
|
||||||
outcome = PASS
|
outcome = PASS
|
||||||
return not outcome in self.test.outcomes
|
return not outcome in self.test.outcomes
|
||||||
|
|
||||||
def HasPreciousOutput(self):
|
|
||||||
return self.UnexpectedOutput() and self.store_unexpected_output
|
|
||||||
|
|
||||||
def HasCrashed(self):
|
def HasCrashed(self):
|
||||||
if utils.IsWindows():
|
if utils.IsWindows():
|
||||||
return 0x80000000 & self.output.exit_code and not (0x3FFFFF00 & self.output.exit_code)
|
return 0x80000000 & self.output.exit_code and not (0x3FFFFF00 & self.output.exit_code)
|
||||||
|
@ -805,11 +799,6 @@ class TestSuite(object):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
# Use this to run several variants of the tests, e.g.:
|
|
||||||
# VARIANT_FLAGS = [[], ['--always_compact', '--noflush_code']]
|
|
||||||
VARIANT_FLAGS = [[]]
|
|
||||||
|
|
||||||
|
|
||||||
class TestRepository(TestSuite):
|
class TestRepository(TestSuite):
|
||||||
|
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
|
@ -828,10 +817,6 @@ class TestRepository(TestSuite):
|
||||||
(file, pathname, description) = imp.find_module('testcfg', [ self.path ])
|
(file, pathname, description) = imp.find_module('testcfg', [ self.path ])
|
||||||
module = imp.load_module('testcfg', file, pathname, description)
|
module = imp.load_module('testcfg', file, pathname, description)
|
||||||
self.config = module.GetConfiguration(context, self.path)
|
self.config = module.GetConfiguration(context, self.path)
|
||||||
if hasattr(self.config, 'additional_flags'):
|
|
||||||
self.config.additional_flags += context.node_args
|
|
||||||
else:
|
|
||||||
self.config.additional_flags = context.node_args
|
|
||||||
finally:
|
finally:
|
||||||
if file:
|
if file:
|
||||||
file.close()
|
file.close()
|
||||||
|
@ -841,10 +826,8 @@ class TestRepository(TestSuite):
|
||||||
return self.GetConfiguration(context).GetBuildRequirements()
|
return self.GetConfiguration(context).GetBuildRequirements()
|
||||||
|
|
||||||
def AddTestsToList(self, result, current_path, path, context, arch, mode):
|
def AddTestsToList(self, result, current_path, path, context, arch, mode):
|
||||||
for v in VARIANT_FLAGS:
|
|
||||||
tests = self.GetConfiguration(context).ListTests(current_path, path,
|
tests = self.GetConfiguration(context).ListTests(current_path, path,
|
||||||
arch, mode)
|
arch, mode)
|
||||||
for t in tests: t.variant_flags = v
|
|
||||||
result += tests
|
result += tests
|
||||||
for i in range(1, context.repeat):
|
for i in range(1, context.repeat):
|
||||||
result += copy.deepcopy(tests)
|
result += copy.deepcopy(tests)
|
||||||
|
@ -883,12 +866,6 @@ class LiteralTestSuite(TestSuite):
|
||||||
test.GetTestStatus(context, sections, defs)
|
test.GetTestStatus(context, sections, defs)
|
||||||
|
|
||||||
|
|
||||||
SUFFIX = {
|
|
||||||
'debug' : '_g',
|
|
||||||
'release' : '' }
|
|
||||||
FLAGS = {
|
|
||||||
'debug' : ['--enable-slow-asserts', '--debug-code', '--verify-heap'],
|
|
||||||
'release' : []}
|
|
||||||
TIMEOUT_SCALEFACTOR = {
|
TIMEOUT_SCALEFACTOR = {
|
||||||
'armv6' : { 'debug' : 12, 'release' : 3 }, # The ARM buildbots are slow.
|
'armv6' : { 'debug' : 12, 'release' : 3 }, # The ARM buildbots are slow.
|
||||||
'arm' : { 'debug' : 8, 'release' : 2 },
|
'arm' : { 'debug' : 8, 'release' : 2 },
|
||||||
|
@ -906,7 +883,6 @@ class Context(object):
|
||||||
self.workspace = workspace
|
self.workspace = workspace
|
||||||
self.buildspace = buildspace
|
self.buildspace = buildspace
|
||||||
self.verbose = verbose
|
self.verbose = verbose
|
||||||
self.vm_root = vm
|
|
||||||
self.node_args = args
|
self.node_args = args
|
||||||
self.expect_fail = expect_fail
|
self.expect_fail = expect_fail
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
|
@ -936,9 +912,6 @@ class Context(object):
|
||||||
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
def GetVmFlags(self, testcase, mode):
|
|
||||||
return testcase.variant_flags + FLAGS[mode]
|
|
||||||
|
|
||||||
def GetTimeout(self, mode):
|
def GetTimeout(self, mode):
|
||||||
return self.timeout * TIMEOUT_SCALEFACTOR[ARCH_GUESS or 'ia32'][mode]
|
return self.timeout * TIMEOUT_SCALEFACTOR[ARCH_GUESS or 'ia32'][mode]
|
||||||
|
|
||||||
|
@ -1036,18 +1009,6 @@ class ListSet(Set):
|
||||||
return len(self.elms) == 0
|
return len(self.elms) == 0
|
||||||
|
|
||||||
|
|
||||||
class Everything(Set):
|
|
||||||
|
|
||||||
def Intersect(self, that):
|
|
||||||
return that
|
|
||||||
|
|
||||||
def Union(self, that):
|
|
||||||
return self
|
|
||||||
|
|
||||||
def IsEmpty(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
class Nothing(Set):
|
class Nothing(Set):
|
||||||
|
|
||||||
def Intersect(self, that):
|
def Intersect(self, that):
|
||||||
|
|
Loading…
Reference in New Issue