File: check_race_conditions

package info (click to toggle)
gitlab-ci-multi-runner 14.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,248 kB
  • sloc: sh: 1,694; makefile: 384; asm: 79; ruby: 68
file content (16 lines) | stat: -rwxr-xr-x 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

# This is the number of race conditions detected on default branch.
# This number is not allowed to increase, and it has to be lowered when we
# fix existing race conditions
max=24

find .testoutput/

cnt=$(cat .testoutput/*/*.race.output.txt | grep -E "^WARNING: DATA RACE$" -c)
echo "Found ${cnt} race conditions. Maximum allowed value is ${max}"

if [ "${cnt}" -gt "${max}" ]; then
  echo "Race conditions count increased"
  exit 1
fi