Skip to content

Commit dfca570

Browse files
committed
Run thread sanitizer on 5.1 test CI jobs
Motivation: Now that SwiftPM with 5.1 supports Linux thread sanitizers, we should run this as part of the normal test pass to catch threading issues. Modifications: Add `--sanitize=thread` argument to `swift test` commands for any job that runs Swift >=5.1. Result: More bugs should be caught as soon as possible now that thread races are being monitored.
1 parent 2a27a59 commit dfca570

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,20 @@ build 5.1ubuntu-bionic:
6767
variables:
6868
REDIS_URL: 'redis'
6969
REDIS_PW: 'password'
70+
SANITIZER_ARG: '--sanitize=thread'
7071
services:
7172
- name: redis:5
7273
alias: 'redis'
7374
command: ["redis-server", "--requirepass", "password"]
7475
script:
7576
- swift build -v
76-
- swift test
77+
- swift test $SANITIZER_ARG
7778

7879
test 5.0:ubuntu-xenial:
7980
extends: .test
8081
image: swift:5.0-xenial
82+
variables:
83+
SANITIZER_ARG: ''
8184
test 5.1:ubuntu-xenial:
8285
extends: .test
8386
image: swift:5.1-xenial
@@ -89,6 +92,8 @@ test latest:ubuntu-xenial:
8992
test 5.0:ubuntu-bionic:
9093
extends: .test
9194
image: swift:5.0-bionic
95+
variables:
96+
SANITIZER_ARG: ''
9297
test 5.1:ubuntu-bionic:
9398
extends: .test
9499
image: swift:5.1-bionic

0 commit comments

Comments
 (0)