Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3e1aa956
authored
6 years ago
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add thread sanitizer to CI.
parent
0744bc50
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
5 deletions
+34
-5
.gitlab-ci.yml
+12
-3
ci_scripts/build_cmake_release.sh
+1
-1
ci_scripts/run_tests.sh
+9
-0
ci_scripts/run_thread_sanitizer.sh
+10
-0
cmake/SetupThreadSanitizer.cmake
+2
-1
No files found.
.gitlab-ci.yml
View file @
3e1aa956
...
...
@@ -3,6 +3,7 @@ image: "ubuntu:latest"
stages
:
-
build
-
test
-
sanitizer
before_script
:
-
apt update; apt-get install --yes --force-yes build-essential cmake
...
...
@@ -10,7 +11,7 @@ before_script:
build_cmake
:
stage
:
build
script
:
./build_cmake_release.sh
./
ci_scripts/
build_cmake_release.sh
artifacts
:
paths
:
-
cmake-build-release/bin/
...
...
@@ -18,4 +19,12 @@ build_cmake:
run_tests
:
stage
:
test
script
:
./build_cmake_release.sh; ./cmake-build-release/bin/tests
\ No newline at end of file
./ci_scripts/run_tests.sh
run_thread_sanitizer
:
stage
:
sanitizer
script
:
./ci_scripts/run_thread_sanitizer.sh
artifacts
:
paths
:
-
cmake-build-release/sanitizer.log.*
\ No newline at end of file
This diff is collapsed.
Click to expand it.
build_cmake_release.sh
→
ci_scripts/
build_cmake_release.sh
View file @
3e1aa956
...
...
@@ -2,7 +2,7 @@
mkdir cmake-build-release
cd
cmake-build-release
cmake ..
-DCMAKE_BUILD_TYPE
=
RELEASE
cmake ..
-DCMAKE_BUILD_TYPE
=
RELEASE
-DTHREAD_SANITIZER
=
OFF
make
# echo the result of make to show it in gitlab
...
...
This diff is collapsed.
Click to expand it.
ci_scripts/run_tests.sh
0 → 100755
View file @
3e1aa956
#!/usr/bin/env bash
mkdir cmake-build-release
cd
cmake-build-release
cmake ..
-DCMAKE_BUILD_TYPE
=
RELEASE
-DTHREAD_SANITIZER
=
OFF
make
# run the actual tests
./bin/tests
This diff is collapsed.
Click to expand it.
ci_scripts/run_thread_sanitizer.sh
0 → 100755
View file @
3e1aa956
#!/usr/bin/env bash
mkdir cmake-build-release-thread-sunitizer
cd
cmake-build-release
cmake ..
-DCMAKE_BUILD_TYPE
=
RELEASE
-DTHREAD_SANITIZER
=
ON
make
# run the actual tests with sanitizer enabled, reporting the result
TSAN_OPTIONS
=
"log_path=sanitizer.log exitcode=1"
./bin/tests
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cmake/SetupThreadSanitizer.cmake
View file @
3e1aa956
...
...
@@ -5,6 +5,6 @@
option
(
THREAD_SANITIZER
"Add thread sanitizer"
OFF
)
if
(
THREAD_SANITIZER
)
add_compile_options
(
-fsanitize=thread -g
)
add_link_options
(
-fsanitize=thread
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-fsanitize=thread"
)
endif
()
message
(
"-- Thread Sanitizer:
${
THREAD_SANITIZER
}
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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