tests/darshan-util: convert to new stand-alone test process (#37836)
This commit is contained in:
		| @@ -91,7 +91,7 @@ def configure_args(self): | |||||||
|         return extra_args |         return extra_args | ||||||
| 
 | 
 | ||||||
|     @property |     @property | ||||||
|     def test_log_path(self): |     def tests_log_path(self): | ||||||
|         if self.version < Version("3.4.1"): |         if self.version < Version("3.4.1"): | ||||||
|             return join_path( |             return join_path( | ||||||
|                 "darshan-test", |                 "darshan-test", | ||||||
| @@ -105,36 +105,23 @@ def test_log_path(self): | |||||||
| 
 | 
 | ||||||
|     @run_after("install") |     @run_after("install") | ||||||
|     def _copy_test_inputs(self): |     def _copy_test_inputs(self): | ||||||
|         test_inputs = [self.test_log_path] |         test_inputs = [self.tests_log_path] | ||||||
|         self.cache_extra_test_sources(test_inputs) |         self.cache_extra_test_sources(test_inputs) | ||||||
| 
 | 
 | ||||||
|     def _test_parser(self): |     def test_parser(self): | ||||||
|         purpose = "Verify darshan-parser can parse an example log \ |         """process example log and check counters""" | ||||||
|                    and check some expected counter values" | 
 | ||||||
|         # Switch to loading the expected strings from the darshan source in future |         # TODO: Switch to loading the expected strings from the darshan source in future | ||||||
|         # filename = self.test_suite.current_test_cache_dir. |         # filename = self.test_suite.current_test_cache_dir. | ||||||
|         #            join(join_path(self.basepath, "mpi-io-test-spack-expected.txt")) |         #            join(join_path(self.basepath, "mpi-io-test-spack-expected.txt")) | ||||||
|         # expected_output = self.get_escaped_text_output(filename) |         # expected_output = self.get_escaped_text_output(filename) | ||||||
|  | 
 | ||||||
|         expected_output = [ |         expected_output = [ | ||||||
|             r"POSIX\s+-1\s+\w+\s+POSIX_OPENS\s+\d+", |             r"POSIX\s+-1\s+\w+\s+POSIX_OPENS\s+\d+", | ||||||
|             r"MPI-IO\s+-1\s+\w+\s+MPIIO_INDEP_OPENS\s+\d+", |             r"MPI-IO\s+-1\s+\w+\s+MPIIO_INDEP_OPENS\s+\d+", | ||||||
|             r"STDIO\s+0\s+\w+\s+STDIO_OPENS\s+\d+", |             r"STDIO\s+0\s+\w+\s+STDIO_OPENS\s+\d+", | ||||||
|         ] |         ] | ||||||
|         logname = self.test_suite.current_test_cache_dir.join(self.test_log_path) |         logname = self.test_suite.current_test_cache_dir.join(self.tests_log_path) | ||||||
|         exe = "darshan-parser" |         parser = which(join_path(self.prefix.bin, "darshan-parser")) | ||||||
|         options = [logname] |         out = parser(logname, output=str.split, error=str.split) | ||||||
|         status = [0] |         check_outputs(expected_output, out) | ||||||
|         installed = True |  | ||||||
|         self.run_test( |  | ||||||
|             exe, |  | ||||||
|             options, |  | ||||||
|             expected_output, |  | ||||||
|             status, |  | ||||||
|             installed, |  | ||||||
|             purpose, |  | ||||||
|             skip_missing=False, |  | ||||||
|             work_dir=None, |  | ||||||
|         ) |  | ||||||
| 
 |  | ||||||
|     def test(self): |  | ||||||
|         self._test_parser() |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tamara Dahlgren
					Tamara Dahlgren