Skip to content

Commit 431496f

Browse files
committed
Filter out death tests in run_tests.py
Adjusted `run_tests.py` to exclude death tests from execution by modifying the gtest filter settings. Renamed death test cases in `task_tests.cpp` for consistency and improved clarity. Also removed an outdated comment in `util.hpp` for better maintainability.
1 parent 93b19ba commit 431496f

3 files changed

Lines changed: 4 additions & 4 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) {
131+
DEATH_TEST(task_tests, check_wrong_order_death_test) {
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) {
143143
EXPECT_DEATH_IF_SUPPORTED(destroy_function(), ".*ORDER OF FUNCTIONS IS NOT RIGHT.*");
144144
}
145145

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

modules/core/util/include/util.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#ifdef _MSC_VER
77
#pragma warning(push)
8-
#pragma warning(disable : 4459) // переменная 'last' перекрывает глобальную
8+
#pragma warning(disable : 4459)
99
#endif
1010

1111
#include <nlohmann/json.hpp>

scripts/run_tests.py

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

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

0 commit comments

Comments
 (0)