biobambam2: fix test scripts to use installed binaries (#45609)

This commit is contained in:
Tamara Dahlgren 2024-08-07 02:43:23 -07:00 committed by GitHub
parent 2106a2be26
commit 4584d85ca6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
@ -38,6 +40,12 @@ def cache_test_sources(self):
install test subdirectory for use during `spack test run`."""
self.cache_extra_test_sources(self.test_src_dir)
# Fix test scripts to run installed binaries
scripts_dir = join_path(install_test_root(self), self.test_src_dir)
for path in os.listdir(scripts_dir):
if path.endswith(".sh"):
filter_file(r"../src/", r"", join_path(scripts_dir, path))
def test_short_sort(self):
"""run testshortsort.sh to check alignments sorted by coordinate"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)