h5bench: include tests for E4S and new version (#37830)

* include tests for h5bench
* update to new test format
* update path
* improve description and detect MPI runner
* fix test name
* Include new release
* update with corrections
* include SLURM dependency and reduce test to one process
* fixes on filters
* fix on oversubscribe
* suggested fixes

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
This commit is contained in:
Jean Luca Bez 2023-08-07 11:43:32 -07:00 committed by GitHub
parent e1f07e98ae
commit 235802013d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ class H5bench(CMakePackage):
version("latest", branch="master", submodules=True)
version("develop", branch="develop", submodules=True)
version("1.4", commit="67a3e6d91508e5ab77db79c6187b2eb3c96119e0", submodules=True)
version("1.3", commit="ec75a466a77c337b4252c0afe1055c7fbe841e16", submodules=True)
version(
"1.2", commit="866af6777573d20740d02acc47a9080de093e4ad", submodules=True, deprecated=True
@ -58,3 +59,30 @@ def cmake_args(self):
]
return args
@run_after("install")
def setup_build_tests(self):
launcher = self.mpi_launcher()
filename = "samples/sync-write-1d-contig-contig.json"
filter_file("mpirun", f"{launcher}", filename)
filter_file(r"-n 2", "-n 1 --timeout 240", filename)
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
cache_extra_test_sources(self, ["tests", "samples"])
def mpi_launcher(self):
commands = ["mpirun", "mpiexec"]
return which(*commands, path=[self.spec["mpi"].prefix.bin]) or which(*commands)
def test_help(self):
"""Run h5bench help."""
h5bench = which(self.prefix.bin.h5bench)
h5bench("-h")
def test_h5bench(self):
"""Run h5bench synchronous write test."""
with working_dir(self.test_suite.current_test_cache_dir):
h5bench = which(self.prefix.bin.h5bench)
h5bench("--debug", "--abort", "samples/sync-write-1d-contig-contig.json")