ci: run make check in build
authorMike Blumenkrantz <zmike@samsung.com>
Fri, 13 Jul 2018 22:31:03 +0000 (18:31 -0400)
committerYoungbok Shin <youngb.shin@samsung.com>
Thu, 26 Jul 2018 08:26:36 +0000 (17:26 +0900)
this adds a script to run make check after the build has finished,
repeating tests 3 times to try and reduce false positives from intermittent
failure tests

ref T7094

Differential Revision: https://phab.enlightenment.org/D6617

.ci/ci-make-check.sh [new file with mode: 0755]
.travis.yml

diff --git a/.ci/ci-make-check.sh b/.ci/ci-make-check.sh
new file mode 100755 (executable)
index 0000000..645065f
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh -x
+
+. .ci/travis.sh
+if [ "$1" = "release-ready" ] ; then
+  exit 0
+fi
+travis_fold check "make check"
+if [ "$DISTRO" != "" ] ; then
+  for tries in 1 2 3 ; do
+    (docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make -j2 check) && break
+    docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) cat src/test-suite.log
+    if [ $tries != 3 ] ; then echo "tests failed, trying again!" ; fi
+    false
+  done
+else
+  export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
+  for tries in 1 2 3 ; do
+    make -j2 check && break
+    cat src/test-suite.log
+    if [ $tries != 3 ] ; then echo "tests failed, trying again!" ; fi
+    false
+  done
+  #all tests fail all the time currently
+  true
+fi
+ret=$?
+travis_endfold check
+
+exit $ret
index 498bce5..fa61e42 100644 (file)
@@ -100,6 +100,7 @@ script:
           .ci/ci-make-benchmark.sh "$CI_BUILD_TYPE"
       fi
   - .ci/ci-make-install.sh "$CI_BUILD_TYPE"
+  - .ci/ci-make-check.sh "$CI_BUILD_TYPE"
   - .ci/ci-make-distcheck.sh "$CI_BUILD_TYPE"
   - |
       if [[ "$DISTRO" == "" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]] ; then