Skip to content

Commit 68f93bb

Browse files
committed
Rename tests and update filters to disable Valgrind-specific cases
Adjusted naming conventions for tests and death tests to append `_disabled_valgrind` where appropriate. Updated `gtest_filter` in the test runner script to exclude Valgrind-incompatible tests for improved compatibility and clarity.
1 parent b7513af commit 68f93bb

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

modules/core/task/func_tests/task_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ TEST(task_tests, check_float) {
128128
EXPECT_NEAR(test_task.GetOutput(), in.size(), 1e-3);
129129
}
130130

131-
DEATH_TEST(task_tests, check_wrong_order_death_test) {
131+
DEATH_TEST(task_tests, check_wrong_order_disabled_valgrind) {
132132
auto destroy_function = [] {
133133
// Create data
134134
std::vector<float> in(20, 1);
@@ -143,7 +143,7 @@ DEATH_TEST(task_tests, check_wrong_order_death_test) {
143143
EXPECT_DEATH_IF_SUPPORTED(destroy_function(), ".*ORDER OF FUNCTIONS IS NOT RIGHT.*");
144144
}
145145

146-
DEATH_TEST(task_tests, check_empty_order_death_test) {
146+
DEATH_TEST(task_tests, check_empty_order_disabled_valgrind) {
147147
auto destroy_function = [] {
148148
// Create data
149149
std::vector<float> in(20, 1);

modules/core/util/func_tests/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ TEST(util_tests, extracts_correct_namespace) {
1717
EXPECT_EQ(kNs, "my::nested");
1818
}
1919

20-
TEST(util_tests, threads_control_check_openmp) {
20+
TEST(util_tests, threads_control_check_openmp_disabled_valgrind) {
2121
int ppc_num_threads = ppc::util::GetNumThreads();
2222

2323
int omp_num_threads = -1;

modules/core/util/include/util.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ constexpr std::string_view GetNamespace() {
5656
if (start == std::string_view::npos) return {};
5757
start += kKey.size();
5858

59-
// Удалим class/struct/enum/union префиксы
6059
constexpr std::string_view prefixes[] = {"class ", "struct ", "enum ", "union "};
6160
for (auto prefix : prefixes) {
6261
if (kFunc.substr(start, prefix.size()) == prefix) {

scripts/run_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def run_threads(self):
8787
def run_core(self):
8888
if platform.system() == "Linux" and not self.__ppc_env.get("PPC_ASAN_RUN"):
8989
self.__run_exec(f"{self.valgrind_cmd} {self.work_dir / 'core_func_tests'} "
90-
f"{self.__get_gtest_settings(1, '*')} --gtest_filter=*:-*_death_test")
90+
f"{self.__get_gtest_settings(1, '*')} --gtest_filter=*:-*_disabled_valgrind")
9191

9292
self.__run_exec(f"{self.work_dir / 'core_func_tests'} {self.__get_gtest_settings(1, '*')}")
9393

0 commit comments

Comments
 (0)