From 4584d85ca6048c5b4e8236bff2cabfe1439b1450 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Wed, 7 Aug 2024 02:43:23 -0700 Subject: biobambam2: fix test scripts to use installed binaries (#45609) --- var/spack/repos/builtin/packages/biobambam2/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/biobambam2/package.py b/var/spack/repos/builtin/packages/biobambam2/package.py index c50f11c47a..1ea3a3a088 100644 --- a/var/spack/repos/builtin/packages/biobambam2/package.py +++ b/var/spack/repos/builtin/packages/biobambam2/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * @@ -38,6 +40,12 @@ class Biobambam2(AutotoolsPackage): 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) -- cgit v1.2.3-70-g09d2