forked from qt-creator/qt-creator
Tests: Provide valgrind testapps in cmake build
Change-Id: I4ec94504e3d2265d066434e118ab2eae6279a42f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
add_subdirectory(callgrind)
|
add_subdirectory(callgrind)
|
||||||
# add_subdirectory(memcheck)
|
if (UNIX)
|
||||||
|
add_subdirectory(memcheck)
|
||||||
|
endif()
|
||||||
|
1
tests/auto/valgrind/memcheck/CMakeLists.txt
Normal file
1
tests/auto/valgrind/memcheck/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(testapps)
|
12
tests/auto/valgrind/memcheck/testapps/CMakeLists.txt
Normal file
12
tests/auto/valgrind/memcheck/testapps/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
add_subdirectory(free1)
|
||||||
|
add_subdirectory(free2)
|
||||||
|
add_subdirectory(invalidjump)
|
||||||
|
add_subdirectory(leak1)
|
||||||
|
add_subdirectory(leak2)
|
||||||
|
add_subdirectory(leak3)
|
||||||
|
add_subdirectory(leak4)
|
||||||
|
add_subdirectory(overlap)
|
||||||
|
add_subdirectory(syscall)
|
||||||
|
add_subdirectory(uninit1)
|
||||||
|
add_subdirectory(uninit2)
|
||||||
|
add_subdirectory(uninit3)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(free1)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(free2)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(invalidjump)
|
@@ -0,0 +1,5 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(leak1)
|
||||||
|
target_link_libraries(leak1 PRIVATE Qt5::Core)
|
||||||
|
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(leak2)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(leak3)
|
@@ -0,0 +1,4 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(leak4)
|
||||||
|
target_link_libraries(leak4 PRIVATE Qt5::Core)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(overlap)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(syscall)
|
4
tests/auto/valgrind/memcheck/testapps/testapp.cmake
Normal file
4
tests/auto/valgrind/memcheck/testapps/testapp.cmake
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
function(add_valgrind_testapp name)
|
||||||
|
add_executable("${name}"
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/main.cpp)
|
||||||
|
endfunction()
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(uninit1)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(uninit2)
|
@@ -0,0 +1,3 @@
|
|||||||
|
include(../testapp.cmake)
|
||||||
|
|
||||||
|
add_valgrind_testapp(uninit3)
|
Reference in New Issue
Block a user