Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
e42d7e6f
Commit
e42d7e6f
authored
May 31, 2018
by
Eric Cano
Browse files
Parallelized execution of valgrind tests.
parent
ab57cdaa
Changes
5
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
e42d7e6f
...
...
@@ -225,3 +225,45 @@ add_custom_target(shortunittests
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess
COMMENT
"Running unit tests"
VERBATIM
)
add_custom_target
(
helgrindBase
echo
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=-OStoreDBPlusMockSchedulerTestVFS*:OStoreTestVFS*:OStoreDBPlusMockSchedulerTestVFS*:InMemory*
COMMAND
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=-OStoreDBPlusMockSchedulerTestVFS*:OStoreTestVFS*:OStoreDBPlusMockSchedulerTestVFS*:InMemory*
COMMAND echo
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests-multiProcess
COMMAND
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests-multiProcess
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT
"Running unit tests with race conditions detection (except slow sections)"
VERBATIM
)
add_custom_target
(
helgrindScheduler
echo
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/Scheduler*
COMMAND
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/Scheduler*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT
"Running unit tests with race conditions detection (Mock scheduler section)"
VERBATIM
)
add_custom_target
(
helgrindOStoreDB
echo
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=OStoreTestVFS*
COMMAND
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=OStoreTestVFS*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT
"Running unit tests with race conditions detection (Object store DB section)"
VERBATIM
)
add_custom_target
(
helgrindDataTransfer
echo
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/DataTransferSessionTest*
COMMAND
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/DataTransferSessionTest*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT
"Running unit tests with race conditions detection (Data transfer section)"
VERBATIM
)
add_custom_target
(
helgrindInMemoryCatalogue
echo
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=InMemory/*
COMMAND
${
VALGRIND
}
--tool=helgrind
${
HELGRIND_OPTS_W_SUPPR
}
-q tests/cta-unitTests --gtest_filter=InMemory/*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT
"Running unit tests with race conditions detection (In memory catalogue section)"
VERBATIM
)
add_custom_target
(
parallelHelgrind
echo
DEPENDS helgrindBase helgrindMockSechduler helgrindOStoreDB helgrindDataTransfer helgrindInMemoryCatalogue
)
cta.spec.in
View file @
e42d7e6f
...
...
@@ -242,6 +242,7 @@ Unit tests and system tests with virtual tape drives
%{_bindir}/cta-systemTests
%{_libdir}/libctadaemonunittests-multiprocess.so*
%attr(0644,root,root) %{_datadir}/%{name}-%{ctaVersion}/unittest/*.suppr
%attr(0644,root,root) %{_datadir}/%{name}-%{ctaVersion}/unittest/parallelTestsMakefile
%package -n cta-objectstore-tools
Summary: CERN Tape Archive: object store tools
...
...
tests/CMakeLists.txt
View file @
e42d7e6f
...
...
@@ -108,6 +108,7 @@ install(TARGETS cta-catalogueUnitTests cta-unitTests cta-unitTests-multiProcess
install
(
TARGETS systemTestHelperTests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
configure_file
(
cta-valgrindUnitTests.sh.in
${
CMAKE_CURRENT_BINARY_DIR
}
/cta-valgrindUnitTests.sh
)
configure_file
(
parallelTestsMakefile.in
${
CMAKE_CURRENT_BINARY_DIR
}
/parallelTestsMakefile
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/cta-valgrindUnitTests.sh cta-unitPlusSystemTests.sh DESTINATION usr/bin
)
install
(
FILES valgrind.suppr helgrind.suppr DESTINATION usr/share/cta-
${
CTA_VERSION
}
/unittest/
)
install
(
FILES valgrind.suppr helgrind.suppr
${
CMAKE_CURRENT_BINARY_DIR
}
/parallelTestsMakefile
DESTINATION usr/share/cta-
${
CTA_VERSION
}
/unittest/
)
tests/cta-valgrindUnitTests.sh.in
View file @
e42d7e6f
#!/bin/bash
# exit from the script on any error.
set
-e
/usr/bin/cta-unitTests
/usr/bin/cta-unitTests-multiProcess
make
-f
/usr/share/cta-@CTA_VERSION@/parallelTestsMakefile
-j
4
valgrind @VALGRIND_OPTS_STR@
--suppressions
=
/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr
\
/usr/bin/cta-unitTests
valgrind
--tool
=
helgrind @HELGRIND_OPTS_STR@
\
--suppressions
=
/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr
\
/usr/bin/cta-unitTests
valgrind @VALGRIND_OPTS_STR@
--suppressions
=
/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr
\
--child-silent-after-fork
=
yes
/usr/bin/cta-unitTests-multiProcess
valgrind
--tool
=
helgrind @HELGRIND_OPTS_STR@
\
--suppressions
=
/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr
\
/usr/bin/cta-unitTests-multiProcess
tests/parallelTestsMakefile.in
0 → 100644
View file @
e42d7e6f
.phony: all
all: valgrind valgrindMultiprocess helgrindBase helgrindScheduler helgrindOStoreDB helgrindDataTransfer helgrindInMemoryCatalogue helgrindMultiprocess
valgrind:
valgrind -q @VALGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr \
/usr/bin/cta-unitTests
valgrindMultiprocess:
valgrind -q @VALGRIND_OPTS_STR@ --child-silent-after-fork=yes \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/valgrind.suppr \
/usr/bin/cta-unitTests-multiProcess
helgrindBase:
valgrind -q --tool=helgrind @HELGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr \
/usr/bin/cta-unitTests \
--gtest_filter=-OStoreDBPlusMockSchedulerTestVFS*:OStoreTestVFS*:OStoreDBPlusMockSchedulerTestVFS*:InMemory*
helgrindScheduler:
valgrind -q --tool=helgrind @HELGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr \
/usr/bin/cta-unitTests \
--gtest_filter=OStoreDBPlusMockSchedulerTestVFS/Scheduler*
helgrindOStoreDB:
valgrind -q --tool=helgrind @HELGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr \
/usr/bin/cta-unitTests \
--gtest_filter=OStoreTestVFS*
helgrindDataTransfer:
valgrind -q --tool=helgrind @HELGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr \
/usr/bin/cta-unitTests \
--gtest_filter=OStoreDBPlusMockSchedulerTestVFS/DataTransferSessionTest*
helgrindInMemoryCatalogue:
valgrind -q --tool=helgrind @HELGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr \
/usr/bin/cta-unitTests \
--gtest_filter=InMemory/*
helgrindMultiprocess:
valgrind -q --tool=helgrind @HELGRIND_OPTS_STR@ \
--suppressions=/usr/share/cta-@CTA_VERSION@/unittest/helgrind.suppr \
/usr/bin/cta-unitTests-multiProcess
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment