Skip to content

Commit 5a56603

Browse files
authored
Merge pull request #4046 from jwpeterson/fix_disable_optional
Disable ConnectedComponentsTest tests when there is no solver package available
2 parents cb6caaf + 37ac67f commit 5a56603

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/mesh/connected_components.C

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <libmesh/mesh.h>
66
#include <libmesh/node.h>
77
#include <libmesh/sparse_matrix.h>
8+
#include <libmesh/system.h>
89

910
#include <timpi/parallel_implementation.h>
1011

@@ -24,9 +25,16 @@ class ConnectedComponentsTest : public CppUnit::TestCase
2425
public:
2526
LIBMESH_CPPUNIT_TEST_SUITE( ConnectedComponentsTest );
2627

28+
/**
29+
* These tests require a valid solver package to be enabled because
30+
* they build a SparseMatrix.
31+
* Note: LIBMESH_HAVE_SOLVER is actually defined in libmesh/system.h
32+
*/
33+
#ifdef LIBMESH_HAVE_SOLVER
2734
CPPUNIT_TEST( testEdge2 );
2835
CPPUNIT_TEST( testEdge3 );
2936
CPPUNIT_TEST( testEdge4 );
37+
#endif
3038

3139
CPPUNIT_TEST_SUITE_END();
3240

0 commit comments

Comments
 (0)