def set_up(self): # Root directory for the "ada_language_server" repository self.env.repo_base = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) self.env.wait_factor = 1 # Absolute paths to programs that test drivers can use if self.env.options.valgrind_memcheck: self.env.als = "{} {} {}".format( self.lookup_program("valgrind"), " ".join(VALGRIND_OPTIONS).format(base=self.env.repo_base), self.lookup_program('server', 'ada_language_server')) self.env.wait_factor = 40 # valgrind is slow else: self.env.als = self.lookup_program('server', 'ada_language_server') self.env.als_home = os.path.join(self.env.repo_base, 'testsuite') self.env.tester_run = self.lookup_program('tester', 'tester-run') self.env.codec_test = self.lookup_program('codec_test', 'codec_test') # If code coverage is requested, initialize our helper and build # instrumented programs. self.env.gnatcov = (GNATcov(self) if self.env.options.gnatcov else None) self.start_time = datetime.datetime.now()
def tear_up(self): # Root directory for the "ada_language_server" repository self.env.repo_base = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) self.env.wait_factor = 1 # Absolute paths to programs that test drivers can use if self.env.options.valgrind_memcheck: self.env.als = "{} --tool=memcheck --quiet {}".format( self.lookup_program("valgrind"), self.lookup_program('server', 'ada_language_server')) self.env.wait_factor = 20 # valgrind is slow else: self.env.als = self.lookup_program('server', 'ada_language_server') self.env.tester_run = self.lookup_program('tester', 'tester-run') self.env.codec_test = self.lookup_program('codec_test', 'codec_test') # If code coverage is requested, initialize our helper and build # instrumented programs. if self.env.options.gnatcov: self.env.gnatcov = GNATcov(self) self.env.gnatcov.build(self.env.options.jobs) else: self.env.gnatcov = None self.start_time = datetime.datetime.now()