]> source.dussan.org Git - gitea.git/commitdiff
Kill testing processes if the test takes too long (#5174)
authorMura Li <typeless@users.noreply.github.com>
Mon, 29 Oct 2018 01:54:13 +0000 (09:54 +0800)
committertechknowlogick <hello@techknowlogick.com>
Mon, 29 Oct 2018 01:54:13 +0000 (21:54 -0400)
When timeout, Send ABRT signal to print backtraces for diagnosis.
The timeout value is set to 1200s (20mins) for now.

.drone.yml

index 08a376ab1cd0897f277b1acb8644057cc3b9eb24..1a770ef4b659a9551bba37305e9f1bdb64382ee0 100644 (file)
@@ -117,18 +117,19 @@ pipeline:
     when:
       event: [ tag ]
 
-      #  test-sqlite:
-      #    image: golang:1.11
-      #    pull: true
-      #    group: test
-      #    environment:
-      #      TAGS: bindata
-      #    commands:
-      #      - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
-      #      - apt-get install -y git-lfs
-      #      - make test-sqlite
-      #    when:
-      #      event: [ push, tag, pull_request ]
+  test-sqlite:
+    image: golang:1.11
+    pull: true
+    group: test
+    environment:
+      TAGS: bindata
+    commands:
+      - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
+      - apt-get install -y git-lfs
+      - (sleep 1200 && (echo 'kill -ABRT $(pidof gitea) $(pidof integrations.sqlite.test)' | sh)) &
+      - make test-sqlite
+    when:
+      event: [ push, tag, pull_request ]
 
   test-mysql:
     image: golang:1.11
@@ -155,6 +156,7 @@ pipeline:
     commands:
       - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
       - apt-get install -y git-lfs
+      - (sleep 1200 && (echo 'kill -ABRT $(pidof gitea) $(pidof integrations.test)' | sh)) &
       - make test-mysql
     when:
       event: [ tag ]
@@ -169,6 +171,7 @@ pipeline:
     commands:
       - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
       - apt-get install -y git-lfs
+      - (sleep 1200 && (echo 'kill -ABRT $(pidof gitea) $(pidof integrations.test)' | sh)) &
       - make test-pgsql
     when:
       event: [ push, tag, pull_request ]