File: main.cpp

package info (click to toggle)
fenics-dolfinx 1%3A0.10.0.post4-1exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,028 kB
  • sloc: cpp: 36,535; python: 25,391; makefile: 226; sh: 171; xml: 55
file content (26 lines) | stat: -rw-r--r-- 710 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <catch2/catch_session.hpp>
#include <catch2/catch_test_macros.hpp>
#include <dolfinx/common/log.h>
#include <mpi.h>

int main(int argc, char* argv[])
{
  dolfinx::init_logging(argc, argv);

  // Parallel tests require MPI initialization before any tests run and
  // termination only after all tests complete.
  MPI_Init(&argc, &argv);

  // Configure test session
  auto session = Catch::Session();

  // Default order for Catch version >= 3.9.0 changed to random.
  // MPI testing requires same order of execution across processes.
  session.configData().runOrder = Catch::TestRunOrder::Declared;

  // Run test session.
  int result = session.run(argc, argv);

  MPI_Finalize();
  return result;
}