Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
b2ce6e01
Commit
b2ce6e01
authored
7 years ago
by
Sergey Yakubov
Browse files
Options
Downloads
Patches
Plain Diff
added valgrind memory check
parent
5188461a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeModules/testing_cpp.cmake
+10
-0
10 additions, 0 deletions
CMakeModules/testing_cpp.cmake
common/cpp/src/system_io.cpp
+4
-4
4 additions, 4 deletions
common/cpp/src/system_io.cpp
producer/api/unittests/test_producer.cpp
+1
-0
1 addition, 0 deletions
producer/api/unittests/test_producer.cpp
with
15 additions
and
4 deletions
CMakeModules/testing_cpp.cmake
+
10
−
0
View file @
b2ce6e01
...
...
@@ -2,6 +2,8 @@ if (BUILD_TESTS)
enable_testing
()
set
(
HIDRA2_MINIMUM_COVERAGE 70
)
find_package
(
Threads
)
find_program
(
MEMORYCHECK_COMMAND valgrind
)
set
(
MEMORYCHECK_COMMAND_OPTIONS
"--trace-children=yes --leak-check=full --error-exitcode=1"
)
endif
()
function
(
gtest target test_source_files test_libraries
)
...
...
@@ -30,5 +32,13 @@ function(gtest target test_source_files test_libraries)
set
(
CMAKE_C_FLAGS
${
CMAKE_C_FLAGS
}
PARENT_SCOPE
)
set
(
CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
PARENT_SCOPE
)
endif
()
if
(
MEMORYCHECK_COMMAND
)
set
(
memcheck_args
${
MEMORYCHECK_COMMAND_OPTIONS
}
)
separate_arguments
(
memcheck_args
)
add_test
(
NAME memcheck-
${
target
}
COMMAND
${
MEMORYCHECK_COMMAND
}
${
memcheck_args
}
${
CMAKE_CURRENT_BINARY_DIR
}
/test-
${
target
}
)
set_tests_properties
(
memcheck-
${
target
}
PROPERTIES LABELS
"memcheck;all"
)
endif
()
endif
()
endfunction
()
This diff is collapsed.
Click to expand it.
common/cpp/src/system_io.cpp
+
4
−
4
View file @
b2ce6e01
...
...
@@ -3,17 +3,17 @@
#include
<system_wrappers/system_io.h>
int
hidra2
::
SystemIO
::
open
(
const
char
*
__file
,
int
__oflag
)
{
return
::
open
(
__file
,
__oflag
);
return
::
open
(
__file
,
__oflag
);
}
int
hidra2
::
SystemIO
::
close
(
int
__fd
)
{
return
::
close
(
__fd
);
return
::
close
(
__fd
);
}
ssize_t
hidra2
::
SystemIO
::
read
(
int
__fd
,
void
*
buf
,
size_t
count
)
{
return
::
read
(
__fd
,
buf
,
count
);
return
::
read
(
__fd
,
buf
,
count
);
}
ssize_t
hidra2
::
SystemIO
::
write
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
)
{
return
::
write
(
__fd
,
__buf
,
__n
);
return
::
write
(
__fd
,
__buf
,
__n
);
}
This diff is collapsed.
Click to expand it.
producer/api/unittests/test_producer.cpp
+
1
−
0
View file @
b2ce6e01
...
...
@@ -9,5 +9,6 @@ TEST(VERSION, VersionAboveZero) {
TEST
(
CreateProducer
,
PointerIsNotNullptr
)
{
hidra2
::
Producer
*
prod
=
hidra2
::
Producer
::
CreateProducer
(
"127.0.0.1"
);
EXPECT_NE
(
prod
,
nullptr
);
delete
prod
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment