Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsavulescu committed Mar 14, 2023
1 parent 3fd2b57 commit 23c7337
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packaging/python/test_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions test/music_tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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):
Expand Down

0 comments on commit 23c7337

Please sign in to comment.