Skip to content

Commit

Permalink
Add desktop dir to environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed Apr 26, 2024
1 parent 0d7da27 commit 5ea24fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions _unittest_solvers/test_00_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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"))
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions pyaedt/generic/spisim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ea24fe

Please sign in to comment.