1 |
ksteube |
1312 |
|
2 |
jfenwick |
3981 |
/***************************************************************************** |
3 |
ksteube |
1811 |
* |
4 |
uqaeller |
6939 |
* Copyright (c) 2003-2020 by The University of Queensland |
5 |
jfenwick |
3981 |
* http://www.uq.edu.au |
6 |
ksteube |
1811 |
* |
7 |
|
|
* Primary Business: Queensland, Australia |
8 |
jfenwick |
6112 |
* Licensed under the Apache License, version 2.0 |
9 |
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
10 |
ksteube |
1811 |
* |
11 |
jfenwick |
3981 |
* Development until 2012 by Earth Systems Science Computational Center (ESSCC) |
12 |
jfenwick |
4657 |
* Development 2012-2013 by School of Earth Sciences |
13 |
uqaeller |
6939 |
* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp) |
14 |
|
|
* Development from 2019 by School of Earth and Environmental Sciences |
15 |
|
|
** |
16 |
jfenwick |
3981 |
*****************************************************************************/ |
17 |
ksteube |
1312 |
|
18 |
caltinay |
6017 |
#include <escript/EsysMPI.h> |
19 |
ksteube |
1811 |
|
20 |
caltinay |
6207 |
#include "FinleyDomainTestCase.h" |
21 |
caltinay |
5997 |
|
22 |
caltinay |
3597 |
#include <cppunit/CompilerOutputter.h> |
23 |
|
|
#include <cppunit/TestResult.h> |
24 |
|
|
#include <cppunit/TestResultCollector.h> |
25 |
|
|
#include <cppunit/TestRunner.h> |
26 |
robwdcock |
649 |
|
27 |
|
|
|
28 |
caltinay |
3597 |
using namespace CppUnit; |
29 |
robwdcock |
649 |
|
30 |
|
|
int main(int argc, char* argv[]) |
31 |
|
|
{ |
32 |
jfenwick |
3259 |
#ifdef ESYS_MPI |
33 |
caltinay |
3597 |
int status = MPI_Init(&argc, &argv); |
34 |
|
|
if (status != MPI_SUCCESS) { |
35 |
|
|
std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl; |
36 |
|
|
return status; |
37 |
|
|
} |
38 |
ksteube |
1312 |
#endif |
39 |
caltinay |
3597 |
TestResult controller; |
40 |
|
|
TestResultCollector result; |
41 |
|
|
controller.addListener(&result); |
42 |
|
|
TestRunner runner; |
43 |
caltinay |
6207 |
runner.addTest(FinleyDomainTestCase::suite()); |
44 |
caltinay |
3597 |
runner.run(controller); |
45 |
caltinay |
6207 |
CompilerOutputter outputter(&result, std::cerr); |
46 |
caltinay |
3597 |
outputter.write(); |
47 |
jfenwick |
3259 |
#ifdef ESYS_MPI |
48 |
caltinay |
3597 |
MPI_Finalize(); |
49 |
ksteube |
1312 |
#endif |
50 |
caltinay |
3597 |
return result.wasSuccessful() ? 0 : 1; |
51 |
robwdcock |
649 |
} |
52 |
|
|
|