Skip to content

Commit 7694c99

Browse files
typelesstechknowlogick
authored andcommitted
Kill testing processes if the test takes too long (#5174)
When timeout, Send ABRT signal to print backtraces for diagnosis. The timeout value is set to 1200s (20mins) for now.
1 parent abf6e0d commit 7694c99

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.drone.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,19 @@ pipeline:
117117
when:
118118
event: [ tag ]
119119

120-
# test-sqlite:
121-
# image: golang:1.11
122-
# pull: true
123-
# group: test
124-
# environment:
125-
# TAGS: bindata
126-
# commands:
127-
# - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
128-
# - apt-get install -y git-lfs
129-
# - make test-sqlite
130-
# when:
131-
# event: [ push, tag, pull_request ]
120+
test-sqlite:
121+
image: golang:1.11
122+
pull: true
123+
group: test
124+
environment:
125+
TAGS: bindata
126+
commands:
127+
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
128+
- apt-get install -y git-lfs
129+
- (sleep 1200 && (echo 'kill -ABRT $(pidof gitea) $(pidof integrations.sqlite.test)' | sh)) &
130+
- make test-sqlite
131+
when:
132+
event: [ push, tag, pull_request ]
132133

133134
test-mysql:
134135
image: golang:1.11
@@ -155,6 +156,7 @@ pipeline:
155156
commands:
156157
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
157158
- apt-get install -y git-lfs
159+
- (sleep 1200 && (echo 'kill -ABRT $(pidof gitea) $(pidof integrations.test)' | sh)) &
158160
- make test-mysql
159161
when:
160162
event: [ tag ]
@@ -169,6 +171,7 @@ pipeline:
169171
commands:
170172
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
171173
- apt-get install -y git-lfs
174+
- (sleep 1200 && (echo 'kill -ABRT $(pidof gitea) $(pidof integrations.test)' | sh)) &
172175
- make test-pgsql
173176
when:
174177
event: [ push, tag, pull_request ]

0 commit comments

Comments
 (0)