-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9ee151
commit d9eddf1
Showing
8 changed files
with
116 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM docker.io/ubuntu:24.04 | ||
|
||
# Check if SANITIZER_NAME argument is passed | ||
ARG SANITIZER_NAME | ||
RUN if [ -z $SANITIZER_NAME ]; then \ | ||
echo "Required SANITIZER_NAME build argument is not passed." ;\ | ||
exit 1 ;\ | ||
fi | ||
|
||
# Copy blazingmq source code | ||
WORKDIR /blazingmq | ||
COPY docker docker | ||
COPY etc etc | ||
COPY src src | ||
COPY CMakeLists.txt ./ | ||
|
||
# Build with sanitizer instrumentation | ||
RUN docker/sanitizers/build_sanitizer.sh ${SANITIZER_NAME} | ||
|
||
# Run unit tests | ||
CMD [ "/blazingmq/cmake.bld/Linux/run-unittests.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Purpose | ||
This folder contains scripts to run BlazingMQ and its dependencies under sanitizer (asan, msan, tsan and ubsan) in Docker container. | ||
|
||
Usually sanitizers check is done on CI, but using Docker it is possible to run sanitizers check in both CI and local environment. | ||
|
||
## Running sanitizer check in local environment to debug sanitizer issues | ||
- Prerequisites: docker should be installed; | ||
- Run docker build from the BlazingMQ root folder: | ||
``` | ||
docker build -f docker/sanitizers/Dockerfile --no-cache --build-arg SANITIZER_NAME=<sanitizer-name> -t sanitizer-<sanitizer-name> . | ||
``` | ||
NOTE: `sanitizer-name` is `asan`, `msan`, `tsan` or `ubsan`. | ||
|
||
- Run docker container with unit tests | ||
``` | ||
docker run --rm sanitizer-<sanitizer-name> | ||
``` | ||
NOTE: `sanitizer-name` - sanitizer's name from previous step. | ||
|
||
For debbugging, it is possible to run docker container with `/bin/bash` option and run desired tests manually, e.g. | ||
``` | ||
docker run --rm -it sanitizer-<sanitizer-name> /bin/bash | ||
root@923efd7529a4:/blazingmq# cd cmake.bld/Linux && ./run-env.sh ctest -R <test-name> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.