Skip to content

Commit 5afcbab

Browse files
committed
ci: improve TSan job reliability
- Use RelWithDebInfo instead of Debug (2-3x faster under TSan) - Set halt_on_error=0 so TSan reports races without killing the process - Add history_size=4 for better race reports - Run ctest with -j1 to avoid parallel test interference under TSan
1 parent 4300c1a commit 5afcbab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/quality.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ jobs:
350350
run: |
351351
source /opt/ros/jazzy/setup.bash
352352
colcon build --symlink-install \
353-
--cmake-args -DCMAKE_BUILD_TYPE=Debug -DSANITIZER=tsan \
353+
--cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSANITIZER=tsan \
354354
--event-handlers console_direct+
355355
ccache -s
356356
@@ -362,14 +362,14 @@ jobs:
362362
- name: Run unit tests with TSan
363363
timeout-minutes: 15
364364
run: |
365-
export TSAN_OPTIONS="halt_on_error=1:suppressions=$(pwd)/tsan_suppressions.txt"
365+
export TSAN_OPTIONS="halt_on_error=0:history_size=4:suppressions=$(pwd)/tsan_suppressions.txt"
366366
source /opt/ros/jazzy/setup.bash
367367
source install/setup.bash
368368
failed=0
369369
for pkg_dir in build/ros2_medkit_*/; do
370370
pkg=$(basename "$pkg_dir")
371371
echo "::group::Testing $pkg"
372-
(cd "$pkg_dir" && ctest -LE "linter|integration" --output-on-failure) || failed=1
372+
(cd "$pkg_dir" && ctest -j1 -LE "linter|integration" --output-on-failure) || failed=1
373373
echo "::endgroup::"
374374
done
375375
exit $failed

0 commit comments

Comments
 (0)