[Groonga-commit] groonga/groonga at ac95830 [master] travis: define retry

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Aug 30 13:36:36 JST 2016


Kouhei Sutou	2016-08-30 13:36:36 +0900 (Tue, 30 Aug 2016)

  New Revision: ac9583091a38414c85564e9d6c2086f4dcfbb7d1
  https://github.com/groonga/groonga/commit/ac9583091a38414c85564e9d6c2086f4dcfbb7d1

  Message:
    travis: define retry

  Modified files:
    tools/travis-script.sh

  Modified: tools/travis-script.sh (+13 -4)
===================================================================
--- tools/travis-script.sh    2016-08-30 13:15:33 +0900 (3b14ad3)
+++ tools/travis-script.sh    2016-08-30 13:36:36 +0900 (09ec3b4)
@@ -13,6 +13,17 @@ set -x
 
 export COLUMNS=79
 
+retry()
+{
+  local i=0
+  while ! "$@"; do
+    if [ $i -eq 3 ]; then
+      exit 1
+    fi
+    i=$((i + 1))
+  done
+}
+
 if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
   memory_fs_size=$[512 * 1024 * 1024] # 512MiB
   byte_per_sector=512
@@ -38,11 +49,9 @@ case "${BUILD_TOOL}" in
       test/mruby/run-test.rb
       test/command_line/run-test.rb
     fi
-    travis_retry \
-      test/command/run-test.sh ${command_test_options} --interface http
+    retry test/command/run-test.sh ${command_test_options} --interface http
     mkdir -p ${prefix}/var/log/groonga/httpd
-    travis_retry \
-      test/command/run-test.sh ${command_test_options} --testee groonga-httpd
+    retry test/command/run-test.sh ${command_test_options} --testee groonga-httpd
     ;;
   cmake)
     test/command/run-test.sh ${command_test_options}
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index