MCPcopy Index your code
hub / github.com/nodejs/node / TestRepository

Class TestRepository

tools/test.py:876–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874
875
876class TestRepository(TestSuite):
877
878 def __init__(self, path):
879 normalized_path = abspath(path)
880 super(TestRepository, self).__init__(basename(normalized_path))
881 self.path = normalized_path
882 self.is_loaded = False
883 self.config = None
884
885 def GetConfiguration(self, context):
886 if self.is_loaded:
887 return self.config
888 self.is_loaded = True
889
890 module = get_module('testcfg', self.path)
891 self.config = module.GetConfiguration(context, self.path)
892 if hasattr(self.config, 'additional_flags'):
893 self.config.additional_flags += context.node_args
894 else:
895 self.config.additional_flags = context.node_args
896 return self.config
897
898 def GetBuildRequirements(self, path, context):
899 return self.GetConfiguration(context).GetBuildRequirements()
900
901 def AddTestsToList(self, result, current_path, path, context, arch, mode):
902 tests = self.GetConfiguration(context).ListTests(current_path, path,
903 arch, mode)
904 result += tests
905 for i in range(1, context.repeat):
906 result += copy.deepcopy(tests)
907
908 def GetTestStatus(self, context, sections, defs):
909 self.GetConfiguration(context).GetTestStatus(sections, defs)
910
911
912class LiteralTestSuite(TestSuite):

Callers 1

MainFunction · 0.85

Calls

no outgoing calls

Tested by 1

MainFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…