Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ foreach(TASK_TYPE ${LIST_OF_TASKS})
set_target_properties(${exec_func_lib} PROPERTIES LINKER_LANGUAGE CXX)

if (USE_FUNC_TESTS)
add_executable(${exec_func_tests} ${FUNC_TESTS_SOURCE_FILES})
add_executable(${exec_func_tests} ${FUNC_TESTS_SOURCE_FILES} "${PATH_TO_TASK}/runner.cpp")
list(APPEND LIST_OF_EXEC_TESTS ${exec_func_tests})
endif (USE_FUNC_TESTS)
if (USE_PERF_TESTS)
add_executable(${exec_perf_tests} ${PERF_TESTS_SOURCE_FILES})
add_executable(${exec_perf_tests} ${PERF_TESTS_SOURCE_FILES} "${PATH_TO_TASK}/runner.cpp")
list(APPEND LIST_OF_EXEC_TESTS ${exec_perf_tests})
endif (USE_PERF_TESTS)

Expand Down
11 changes: 0 additions & 11 deletions tasks/mpi/example/func_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,3 @@ TEST(Parallel_Operations_MPI, Test_Max_2) {
ASSERT_EQ(reference_max[0], global_max[0]);
}
}

int main(int argc, char** argv) {
boost::mpi::environment env(argc, argv);
boost::mpi::communicator world;
::testing::InitGoogleTest(&argc, argv);
::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners();
if (world.rank() != 0) {
delete listeners.Release(listeners.default_result_printer());
}
return RUN_ALL_TESTS();
}
11 changes: 0 additions & 11 deletions tasks/mpi/example/perf_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,3 @@ TEST(mpi_example_perf_test, test_task_run) {
ASSERT_EQ(count_size_vector, global_sum[0]);
}
}

int main(int argc, char** argv) {
boost::mpi::environment env(argc, argv);
boost::mpi::communicator world;
::testing::InitGoogleTest(&argc, argv);
::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners();
if (world.rank() != 0) {
delete listeners.Release(listeners.default_result_printer());
}
return RUN_ALL_TESTS();
}
15 changes: 15 additions & 0 deletions tasks/mpi/runner.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <gtest/gtest.h>

#include <boost/mpi/communicator.hpp>
#include <boost/mpi/environment.hpp>

int main(int argc, char** argv) {
boost::mpi::environment env(argc, argv);
boost::mpi::communicator world;
::testing::InitGoogleTest(&argc, argv);
::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners();
if (world.rank() != 0) {
delete listeners.Release(listeners.default_result_printer());
}
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/omp/example/func_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,3 @@ TEST(Parallel_Operations_OpenMP, Test_Mult_2) {
testOmpTaskParallel.post_processing();
ASSERT_EQ(ref_res[0], par_res[0]);
}

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/omp/example/perf_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,3 @@ TEST(openmp_example_perf_test, test_task_run) {
ppc::core::Perf::print_perf_statistic(perfResults);
ASSERT_EQ(count + 1, out[0]);
}

int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
6 changes: 6 additions & 0 deletions tasks/omp/runner.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <gtest/gtest.h>

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/seq/example/func_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,3 @@ TEST(Sequential, Test_Sum_100) {
testTaskSequential.post_processing();
ASSERT_EQ(count, out[0]);
}

int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/seq/example/perf_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,3 @@ TEST(sequential_example_perf_test, test_task_run) {
ppc::core::Perf::print_perf_statistic(perfResults);
ASSERT_EQ(count, out[0]);
}

int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
6 changes: 6 additions & 0 deletions tasks/seq/runner.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <gtest/gtest.h>

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/stl/example/func_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,3 @@ TEST(Parallel_Operations_STL_Threads, Test_Diff_2) {
TestSTLTaskParallel.post_processing();
ASSERT_EQ(ref_res[0], par_res[0]);
}

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/stl/example/perf_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,3 @@ TEST(stl_example_perf_test, test_task_run) {
ppc::core::Perf::print_perf_statistic(perfResults);
ASSERT_EQ(count, out[0]);
}

int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
6 changes: 6 additions & 0 deletions tasks/stl/runner.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <gtest/gtest.h>

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/tbb/example/func_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,3 @@ TEST(Parallel_Operations_TBB, Test_Mult_2) {
testTbbTaskParallel.post_processing();
ASSERT_EQ(ref_res[0], par_res[0]);
}

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 0 additions & 5 deletions tasks/tbb/example/perf_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,3 @@ TEST(tbb_example_perf_test, test_task_run) {
ppc::core::Perf::print_perf_statistic(perfResults);
ASSERT_EQ(count + 1, out[0]);
}

int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
6 changes: 6 additions & 0 deletions tasks/tbb/runner.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <gtest/gtest.h>

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Loading