diff --git a/regressiontest/image_build_list.txt b/regressiontest/image_build_list.txt index 89bc14ac2276b85896c880e5909d00f7da8ffc52..ef12aeae2b5ed3a066745b96b8b2dd536a12c510 100644 --- a/regressiontest/image_build_list.txt +++ b/regressiontest/image_build_list.txt @@ -2,3 +2,4 @@ unb2c lofar2_unb2c_sdp_station lofar2_unb2c_sdp_station_full unb2b lofar2_unb2b_sdp_station lofar2_unb2b_sdp_station_full_wg unb2b lofar2_unb2b_sdp_station disturb2_unb2b_sdp_station_full unb2b lofar2_unb2b_sdp_station disturb2_unb2b_sdp_station_full_wg +# end \ No newline at end of file diff --git a/regressiontest/modelsim_regression_test_vhdl.py b/regressiontest/modelsim_regression_test_vhdl.py index 2e3729df78e12d3b931bdc8789aaf05308015c4e..388b6a38e4cbd5bae3cb1af649e70af1c01e7642 100755 --- a/regressiontest/modelsim_regression_test_vhdl.py +++ b/regressiontest/modelsim_regression_test_vhdl.py @@ -446,14 +446,17 @@ class TestBenchWorker(multiprocessing.Process): self.sim_errors = [] self.n_tb = 0 self.run_time = 0 + sim_dir = os.path.join(os.getenv("HDL_BUILD_DIR"), f"sim_worker{self._id}") if not os.path.exists(sim_dir): os.mkdir(sim_dir) - os.environ["HDL_IOFILE_SIM_DIR"] = sim_dir - self.terminal = Terminal(print_stdout_on_timeout=True) - self.terminal.run_cmd(f"rm -rf {sim_dir}/*") - print(self.terminal.stdout()) + + logger.info("%s", str(os.environ)) + + terminal = Terminal(print_stdout_on_timeout=True) + terminal.run_cmd(f"rm -rf {sim_dir}/*") + logger.debug("%s", terminal.stdout()) # get do templates tmpl_path = os.path.join(os.getenv("RADIOHDL_GEAR"), "regressiontest") @@ -564,7 +567,6 @@ class TestBenchWorker(multiprocessing.Process): def halt(self): self._halt = True - self.terminal.kill() logger.info("stop worker %d", self._id) def make_new_do_files(self): @@ -656,14 +658,14 @@ class TestBenchWorker(multiprocessing.Process): # Simulate the do file with Modelsim vsim_cmd = f"cli_modelsim {self.buildset} {do_pathname}" logger.debug('%s: run mk_all do file for "%s"', self.lib_name, do_name) - - run_exitcode = self.terminal.run_cmd(vsim_cmd, timeout=self._max_mk_time) + terminal = Terminal(print_stdout_on_timeout=True) + run_exitcode = terminal.run_cmd(vsim_cmd, timeout=self._max_mk_time) if self._halt: return if run_exitcode == 0: - do_log = self.terminal.stdout() + do_log = terminal.stdout() self.write_do_log(do_log, f"{self.lib_name}_mk") # get vsim exitcode @@ -694,14 +696,14 @@ class TestBenchWorker(multiprocessing.Process): this_mk_failed = True else: logger.error("%s: Error occured while calling: %s", self.lib_name, vsim_cmd) - if self.terminal.exit_on_timeout(): + if terminal.exit_on_timeout(): self.mk_errors.append( [self.lib_name, [f"timeout in {self._max_mk_time:3.0f} seconds"]] ) # get first 10 errors - if self.terminal.error(): - logger.error("%s: cmd output stdout: \n%s", self.lib_name, self.terminal.stdout()) - logger.error("%s: cmd output stderr: \n%s", self.lib_name, self.terminal.stderr()) + if terminal.error(): + logger.error("%s: cmd output stdout: \n%s", self.lib_name, terminal.stdout()) + logger.error("%s: cmd output stderr: \n%s", self.lib_name, terminal.stderr()) this_mk_failed = True if this_mk_failed: @@ -745,15 +747,16 @@ class TestBenchWorker(multiprocessing.Process): # Simulate the do file with Modelsim vsim_cmd = f"cli_modelsim {self.buildset} {do_pathname}" logger.debug(f"{self.tb_name}: run modelsim test '{do_name}'") - - run_exitcode = self.terminal.run_cmd(vsim_cmd, timeout=self._max_sim_time) + + terminal = Terminal(print_stdout_on_timeout=True) + run_exitcode = terminal.run_cmd(vsim_cmd, timeout=self._max_sim_time) if self._halt: return logger.debug(f"{self.tb_name}: modelsim test '{do_name}' done") if run_exitcode == 0: - do_log = self.terminal.stdout() + do_log = terminal.stdout() self.write_do_log(do_log, f"{self.tb_name}_sim") # get vsim exitcode @@ -783,13 +786,13 @@ class TestBenchWorker(multiprocessing.Process): this_tb_failed = True else: logger.error(f"{self.tb_name}: Error occured while calling: {vsim_cmd}") - if self.terminal.exit_on_timeout(): + if terminal.exit_on_timeout(): self.sim_errors.append( [self.tb_name, [f"timeout in {self._max_sim_time:3.0f} seconds"]] ) # get first 10 errors - if self.terminal.error(): - logger.error(f"{self.tb_name}: cmd output: \n{self.terminal.stderr()}") + if terminal.error(): + logger.error(f"{self.tb_name}: cmd output: \n{terminal.stderr()}") this_tb_failed = True