test: add memory check reporting
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0cfc4c72ca
commit
c186195e24
@ -64,6 +64,12 @@ steps:
|
||||
- cd cmake-build-ci
|
||||
- cmake --build .
|
||||
- make coverage
|
||||
- name: Generate memory report
|
||||
image: registry.riba-interactive.de/reportly:latest
|
||||
settings:
|
||||
input_path: Testing
|
||||
report_output: reports/memory_report.md
|
||||
verbose: true
|
||||
|
||||
- name: Report test and coverage
|
||||
image: alpine
|
||||
|
||||
@ -33,6 +33,8 @@ if ((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR MODERN_CMAKE_BUILD_TESTING)
|
||||
if (ENABLE_TEST_COVERAGE)
|
||||
include(CodeCoverage)
|
||||
|
||||
set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full")
|
||||
|
||||
setup_target_for_coverage_lcov(
|
||||
NAME coverage
|
||||
EXECUTABLE ${CMAKE_CTEST_COMMAND} -T memcheck
|
||||
|
||||
@ -112,7 +112,11 @@ spec("hashtable") {
|
||||
value *value = value_new(1337);
|
||||
check(value_hashtable_insert(hashtable, key, value) == 0);
|
||||
check(value != NULL, "value should not be NULL");
|
||||
value_destroy(&value);
|
||||
//value_destroy(&value);
|
||||
free(value);
|
||||
free(value);
|
||||
value_new(1234);
|
||||
free(NULL);
|
||||
}
|
||||
|
||||
it("should return 0 with NULL as this param") {
|
||||
|
||||
@ -135,7 +135,7 @@ spec("list") {
|
||||
it("should return 0 with NULL as this param") {
|
||||
value *value = value_new(1);
|
||||
check(value_list_unshift(NULL, value) == 0, "return should not be 0");
|
||||
value_destroy(&value);
|
||||
//value_destroy(&value);
|
||||
}
|
||||
|
||||
it("should return 0 with NULL as valueElement param") {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user