diff --git a/_unittest_solvers/test_00_analyze.py b/_unittest_solvers/test_00_analyze.py index 580b6305ed5..840ab6ea33e 100644 --- a/_unittest_solvers/test_00_analyze.py +++ b/_unittest_solvers/test_00_analyze.py @@ -431,7 +431,6 @@ def test_07_export_maxwell_fields(self, m3dtransient): new_setup.props = setup.props new_setup.update() - @pytest.mark.skipif(is_linux, reason="SPISIM is not working in Linux.") def test_08_compute_erl(self, circuit_erl): touchstone_file = circuit_erl.export_touchstone() spisim = SpiSim(touchstone_file) @@ -453,7 +452,6 @@ def test_08_compute_erl(self, circuit_erl): erl_data_3 = spisim.compute_erl(specify_through_ports=[1, 2, 3, 4]) assert erl_data_3 - @pytest.mark.skipif(is_linux, reason="SPISIM not working in linux.") def test_09a_compute_com(self, local_scratch, circuit_com): touchstone_file = circuit_com.export_touchstone() spisim = SpiSim(touchstone_file) @@ -466,7 +464,6 @@ def test_09a_compute_com(self, local_scratch, circuit_com): ) assert com - @pytest.mark.skipif(is_linux, reason="SPISIM not working in linux.") def test_09b_compute_com(self, local_scratch): com_example_file_folder = os.path.join(local_path, "example_models", test_subfolder, "com_unit_test_sparam") thru_s4p = local_scratch.copyfile(os.path.join(com_example_file_folder, "SerDes_Demo_02_Thru.s4p")) @@ -506,7 +503,7 @@ def test_09b_compute_com(self, local_scratch): ) assert com_0 and com_1 - @pytest.mark.skipif(is_linux, reason="SPISIM not working in linux.") + def test_09c_compute_com(self, local_scratch): com_example_file_folder = Path(local_path) / "example_models" / test_subfolder / "com_unit_test_sparam" thru_s4p = local_scratch.copyfile(com_example_file_folder / "SerDes_Demo_02_Thru.s4p") diff --git a/pyaedt/generic/spisim.py b/pyaedt/generic/spisim.py index 9593205a78f..d2e2f1c1507 100644 --- a/pyaedt/generic/spisim.py +++ b/pyaedt/generic/spisim.py @@ -73,6 +73,8 @@ def _compute_spisim(self, parameter, out_file="", touchstone_file="", config_fil my_env = os.environ.copy() my_env.update(settings.aedt_environment_variables) if is_linux: # pragma: no cover + if "ANSYSEM_ROOT_PATH" not in my_env: + my_env["ANSYSEM_ROOT_PATH"] = self.desktop_install_dir command.append("&") with open_file(out_processing, "w") as outfile: subprocess.Popen(command, env=my_env, stdout=outfile, stderr=outfile).wait() # nosec