forked from RepentantGopher/tnt-kafka
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch introduces a way to enable ASAN in our tests. Also special workflow is introduced. This patch is also catched heap-overflow buffer. Closes #67
- Loading branch information
Showing
6 changed files
with
91 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: fast_testing | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linux: | ||
# We want to run on external PRs, but not on our own internal | ||
# PRs as they'll be run by the push to the branch. | ||
# | ||
# The main trick is described here: | ||
# https://github.com/Dart-Code/Dart-Code/pull/2375 | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Clone the module | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Start Kafka | ||
uses: 280780363/[email protected] | ||
with: | ||
kafka version: "latest" | ||
zookeeper version: "latest" | ||
kafka port: 9092 | ||
auto create topic: "true" | ||
|
||
- name: Install Python dependencies | ||
run: pip3 install -r tests/requirements.txt | ||
|
||
- name: Build module | ||
run: | | ||
export MAKEFLAGS=-j8 | ||
export CC=clang | ||
export CXX=clang++ | ||
git clone https://github.com/tarantool/tarantool | ||
cd tarantool | ||
git checkout 2.10 | ||
export LSAN_OPTIONS=suppressions=${PWD}/asan/lsan.supp | ||
cmake . -DENABLE_ASAN=ON -DENABLE_DIST=ON | ||
make -j16 | ||
sudo make install | ||
cd .. | ||
tarantoolctl rocks STATIC_BUILD=ON ENABLE_ASAN=ON make | ||
- name: Run tarantool application | ||
run: | | ||
export TT_LOG=tarantool.log | ||
export LSAN_OPTIONS=suppressions=${PWD}/tarantool/asan/lsan.supp | ||
tarantool tests/app.lua > output.log 2>&1 & | ||
- name: Run test | ||
run: KAFKA_HOST=localhost:9092 pytest tests | ||
|
||
- name: Print Tarantool logs | ||
if: always() | ||
run: | | ||
cat tarantool.log | ||
cat output.log |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: fast_testing | ||
name: asan_testing | ||
|
||
on: | ||
push: | ||
|
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
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