biobambam2: Add test method and test scripts. (#21504)
Co-Authored-By: Tamara Dahlgren <dahlgren1@llnl.gov>
This commit is contained in:
parent
02a4abadfa
commit
fe863b68b2
@ -21,6 +21,26 @@ class Biobambam2(AutotoolsPackage):
|
|||||||
depends_on('m4', type='build')
|
depends_on('m4', type='build')
|
||||||
depends_on('libmaus2')
|
depends_on('libmaus2')
|
||||||
|
|
||||||
|
test_src_dir = 'test'
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = ['--with-libmaus2={0}'.format(self.spec['libmaus2'].prefix)]
|
args = ['--with-libmaus2={0}'.format(self.spec['libmaus2'].prefix)]
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
def _fix_shortsort(self):
|
||||||
|
"""Fix the testshortsort.sh file copied during installation."""
|
||||||
|
test_dir = join_path(self.install_test_root, self.test_src_dir)
|
||||||
|
filter_file('../src/', '', join_path(test_dir, 'testshortsort.sh'))
|
||||||
|
|
||||||
|
@run_after('install')
|
||||||
|
def cache_test_sources(self):
|
||||||
|
"""Copy the test source files after the package is installed to an
|
||||||
|
install test subdirectory for use during `spack test run`."""
|
||||||
|
self.cache_extra_test_sources(self.test_src_dir)
|
||||||
|
self._fix_shortsort()
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
test_dir = join_path(self.install_test_root, self.test_src_dir)
|
||||||
|
self.run_test('sh', ['testshortsort.sh'],
|
||||||
|
expected='Alignments sorted by coordinate.',
|
||||||
|
work_dir=test_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user