Calls the cpp tests directly
(self, applications, timer, config)
| 235 | sys.stderr.flush() |
| 236 | |
| 237 | def RunCppTests(self, applications, timer, config): |
| 238 | ''' Calls the cpp tests directly |
| 239 | ''' |
| 240 | |
| 241 | # Iterate over all executables that are not mpi dependant and execute them. |
| 242 | print(kratos_utils.GetKratosMultiphysicsPath()) |
| 243 | for test_suite in os.listdir(os.path.join(os.path.dirname(kratos_utils.GetKratosMultiphysicsPath()), "test")): |
| 244 | filename = str(Path(os.fsdecode(test_suite)).with_suffix('')) # Name of the file without extension |
| 245 | binfname = os.fsdecode(test_suite) # Name of the file with extension |
| 246 | |
| 247 | working_dir = os.getcwd() |
| 248 | |
| 249 | if filename in config and "working_dir" in config[filename]: |
| 250 | working_dir = config[filename]["working_dir"] |
| 251 | |
| 252 | # Skip mpi tests |
| 253 | if ("MPI" not in filename and self.TestToAppName(filename) in applications) or filename == "KratosCoreTest": |
| 254 | |
| 255 | # Run all the tests in the executable |
| 256 | self._RunTest( |
| 257 | test_suit_name=filename, |
| 258 | command=[ |
| 259 | os.path.join(os.path.dirname(kratos_utils.GetKratosMultiphysicsPath()),"test",binfname) |
| 260 | ], |
| 261 | timer=timer, |
| 262 | working_dir=working_dir |
| 263 | ) |
| 264 | |
| 265 | def RunMPIPythonTests(self, applications, mpi_command, mpi_flags, num_processes_flag, num_processes, level, verbose, command, timer): |
| 266 |