Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Maas committed Nov 29, 2024
1 parent ab5af9a commit 8f6a7a4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
7 changes: 0 additions & 7 deletions tests/datastructures/array_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,12 @@

#include "mt-kahypar/parallel/stl/scalable_vector.h"
#include "mt-kahypar/datastructures/array.h"
#include "mt-kahypar/parallel/hardware_topology.h"
#include "mt-kahypar/parallel/tbb_initializer.h"
#include "tests/parallel/topology_mock.h"

using ::testing::Test;

namespace mt_kahypar {
namespace ds {

using TopoMock = mt_kahypar::parallel::TopologyMock<2>;
using HwTopology = mt_kahypar::parallel::HardwareTopology<TopoMock, parallel::topology_t, parallel::node_t>;
using TBB = mt_kahypar::parallel::TBBInitializer<HwTopology, false>;

TEST(AArray, WritesAnValueToStrippedVector1) {
Array<int> vec(256, 0);
vec[0] = 31;
Expand Down
15 changes: 13 additions & 2 deletions tests/datastructures/hypergraph_fixtures.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,26 @@
#include "gmock/gmock.h"

#include "mt-kahypar/definitions.h"
#include "mt-kahypar/parallel/hardware_topology.h"
#include "mt-kahypar/parallel/tbb_initializer.h"
#include "tests/parallel/topology_mock.h"

#ifndef KAHYPAR_DISABLE_HWLOC
#include "mt-kahypar/parallel/hardware_topology.h"
#include "tests/parallel/topology_mock.h"
#endif

using ::testing::Test;

namespace mt_kahypar {
namespace ds {

#ifndef KAHYPAR_DISABLE_HWLOC
using TopoMock = mt_kahypar::parallel::TopologyMock<2>;
using HwTopology = mt_kahypar::parallel::HardwareTopology<TopoMock, parallel::topology_t, parallel::node_t>;
using TBB = mt_kahypar::parallel::TBBInitializer<HwTopology, false>;
#else
using TBB = mt_kahypar::parallel::SimpleTBBInitializer;
#endif

static auto identity = [](const HypernodeID& id) { return id; };

template<typename Hypergraph, bool useGraphStructure = false>
Expand Down
8 changes: 0 additions & 8 deletions tests/parallel/memory_pool_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,12 @@
#include <tbb/task_group.h>

#include "mt-kahypar/parallel/memory_pool.h"
#include "mt-kahypar/parallel/hardware_topology.h"
#include "mt-kahypar/parallel/tbb_initializer.h"
#include "tests/parallel/topology_mock.h"

using ::testing::Test;

namespace mt_kahypar {
namespace parallel {

using TopoMock = mt_kahypar::parallel::TopologyMock<2>;
using HwTopology = mt_kahypar::parallel::HardwareTopology<TopoMock, parallel::topology_t, parallel::node_t>;
using TBB = mt_kahypar::parallel::TBBInitializer<HwTopology, false>;


template <class F, class K>
void executeConcurrent(F f1, K f2) {
std::atomic<int> cnt(0);
Expand Down
6 changes: 4 additions & 2 deletions tests/partition/initial_partitioning/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
target_sources(mtkahypar_tests PRIVATE
flat_initial_partitioner_test.cc
initial_partitioning_data_container_test.cc
pool_initial_partitioner_test.cc
)

if(NOT KAHYPAR_DISABLE_BOOST)
if(NOT KAHYPAR_DISABLE_BOOST AND NOT KAHYPAR_DISABLE_HWLOC)
target_sources(mtkahypar_tests PRIVATE initial_partitioner_test.cc)
endif()
if(NOT KAHYPAR_DISABLE_HWLOC)
target_sources(mtkahypar_tests PRIVATE pool_initial_partitioner_test.cc)
endif()
8 changes: 4 additions & 4 deletions tests/partition/refinement/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ target_sources(mtkahypar_tests PRIVATE
scheduler_test.cc
# quotient_graph_test.cc
gain_policy_test.cc
label_propagation_refiner_test.cc
rollback_test.cc
rebalance_test.cc
advanced_rebalancer_test.cc
Expand All @@ -16,7 +15,8 @@ target_sources(mtkahypar_tests PRIVATE
)

if(NOT KAHYPAR_DISABLE_BOOST)
target_sources(mtkahypar_tests PRIVATE
bipartitioning_gain_policy_test.cc
)
target_sources(mtkahypar_tests PRIVATE bipartitioning_gain_policy_test.cc)
endif()
if(NOT KAHYPAR_DISABLE_HWLOC)
target_sources(mtkahypar_tests PRIVATE label_propagation_refiner_test.cc)
endif()

0 comments on commit 8f6a7a4

Please sign in to comment.