tests/mfem: convert to new stand-alone test process (#38011)
* mfem: convert to new stand-alone test process * Restore make target, use config_mk property
This commit is contained in:
		| @@ -1116,30 +1116,22 @@ def cache_test_sources(self): | |||||||
|         make("examples/clean", parallel=False) |         make("examples/clean", parallel=False) | ||||||
|         self.cache_extra_test_sources([self.examples_src_dir, self.examples_data_dir]) |         self.cache_extra_test_sources([self.examples_src_dir, self.examples_data_dir]) | ||||||
| 
 | 
 | ||||||
|     def test(self): |     def test_ex10(self): | ||||||
|         test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) |         """build and run ex10(p)""" | ||||||
| 
 |  | ||||||
|         # MFEM has many examples to serve as a suitable smoke check. ex10 |         # MFEM has many examples to serve as a suitable smoke check. ex10 | ||||||
|         # was chosen arbitrarily among the examples that work both with |         # was chosen arbitrarily among the examples that work both with | ||||||
|         # MPI and without it |         # MPI and without it | ||||||
|         test_exe = "ex10p" if ("+mpi" in self.spec) else "ex10" |         test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) | ||||||
|         self.run_test( |  | ||||||
|             "make", |  | ||||||
|             ["CONFIG_MK={0}/share/mfem/config.mk".format(self.prefix), test_exe, "parallel=False"], |  | ||||||
|             purpose="test: building {0}".format(test_exe), |  | ||||||
|             skip_missing=False, |  | ||||||
|             work_dir=test_dir, |  | ||||||
|         ) |  | ||||||
| 
 | 
 | ||||||
|         self.run_test( |         mesh = join_path("..", self.examples_data_dir, "beam-quad.mesh") | ||||||
|             "./{0}".format(test_exe), |         test_exe = "ex10p" if ("+mpi" in self.spec) else "ex10" | ||||||
|             ["--mesh", "../{0}/beam-quad.mesh".format(self.examples_data_dir)], | 
 | ||||||
|             [], |         with working_dir(test_dir): | ||||||
|             installed=False, |             make = which("make") | ||||||
|             purpose="test: running {0}".format(test_exe), |             make(f"CONFIG_MK={self.config_mk}", test_exe, "parallel=False") | ||||||
|             skip_missing=False, | 
 | ||||||
|             work_dir=test_dir, |             ex10 = which(test_exe) | ||||||
|         ) |             ex10("--mesh", mesh) | ||||||
| 
 | 
 | ||||||
|     # this patch is only needed for mfem 4.1, where a few |     # this patch is only needed for mfem 4.1, where a few | ||||||
|     # released files include byte order marks |     # released files include byte order marks | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tamara Dahlgren
					Tamara Dahlgren