diff --git a/packaging/python/test_wheels.sh b/packaging/python/test_wheels.sh index 3ae3745e65..ae3e159617 100755 --- a/packaging/python/test_wheels.sh +++ b/packaging/python/test_wheels.sh @@ -114,7 +114,7 @@ run_mpi_test () { # test MUSIC if enabled if [[ "$has_music" == "true" ]] && [[ $mpi_name == *"OpenMPI"* || $mpi_name == *"MPICH"* ]]; then - export PATH=/opt/nrnwheel/MUSIC/bin:/nrnwheel/MUSIC/bin:$PATH + export MUSIC_LIBDIR=/nrnwheel/MUSIC/lib $python_exe test/music_tests/runtests.py fi diff --git a/test/music_tests/runtests.py b/test/music_tests/runtests.py index 4d3f26baf8..956c8878eb 100644 --- a/test/music_tests/runtests.py +++ b/test/music_tests/runtests.py @@ -2,9 +2,9 @@ if not "NRN_ENABLE_MUSIC=ON" in h.nrnversion(6): print("skip music_tests; NRN_ENABLE_MUSIC is not ON") - quit() import subprocess +from shutil import which # the test system copies the files in the source folder to # .../build/test/nrnmusic/music_tests/test/music_tests @@ -24,6 +24,7 @@ def run(cmd): result = subprocess.run(cmd, env=my_env, shell=True, capture_output=True, text=True) + print("PATH:", my_env["PATH"]) if result.returncode != 0: print(result.stderr) print(result.stdout) @@ -40,9 +41,9 @@ def run(cmd): print("MUSIC_BINPATH:", music_bin_path) my_env["PATH"] = music_bin_path + my_env["PATH"] -result = run("which music") -print("music path:", result.stdout) -musicpath = "/".join(result.stdout.strip().split("/")[:-2]) +result = which("music", path=my_env["PATH"]) +print("music exe:", result) +musicpath = "/".join(result.strip().split("/")[:-2]) # need NRN_LIBMUSIC_PATH if mpi dynamic if "NRN_ENABLE_MPI_DYNAMIC=ON" in h.nrnversion(6):