diff options
-rw-r--r-- | var/spack/repos/builtin/packages/darshan-util/package.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py index 4f878b07d6..4b0b617cb6 100644 --- a/var/spack/repos/builtin/packages/darshan-util/package.py +++ b/var/spack/repos/builtin/packages/darshan-util/package.py @@ -93,20 +93,26 @@ class DarshanUtil(AutotoolsPackage): return extra_args @property - def basepath(self): - return join_path("darshan-test", "example-output") + def test_log_path(self): + if self.version < Version("3.4.1"): + return join_path( + "darshan-test", + "example-output", + "mpi-io-test-x86_64-{0}.darshan".format(self.version), + ) + else: + return join_path( + "darshan-util", "pydarshan", "darshan", "tests", "input", "sample.darshan" + ) @run_after("install") def _copy_test_inputs(self): - # add darshan-test/example-output/mpi-io-test-spack-expected.txt" - test_inputs = [ - join_path(self.basepath, "mpi-io-test-x86_64-{0}.darshan".format(self.spec.version)) - ] + test_inputs = [self.test_log_path] self.cache_extra_test_sources(test_inputs) def _test_parser(self): purpose = "Verify darshan-parser can parse an example log \ - from the current version and check some expected counter values" + and check some expected counter values" # Switch to loading the expected strings from the darshan source in future # filename = self.test_suite.current_test_cache_dir. # join(join_path(self.basepath, "mpi-io-test-spack-expected.txt")) @@ -116,9 +122,7 @@ class DarshanUtil(AutotoolsPackage): r"MPI-IO\s+-1\s+\w+\s+MPIIO_INDEP_OPENS\s+\d+", r"STDIO\s+0\s+\w+\s+STDIO_OPENS\s+\d+", ] - logname = self.test_suite.current_test_cache_dir.join( - join_path(self.basepath, "mpi-io-test-x86_64-{0}.darshan".format(self.spec.version)) - ) + logname = self.test_suite.current_test_cache_dir.join(self.test_log_path) exe = "darshan-parser" options = [logname] status = [0] |