Skip to content

Apache DataFusion SQL Query Engine

ARROW-3948: [GLib][CI] Set timeout to Homebrew

Kouhei Sutouc0079aef266a
diff --git a/.travis.yml b/.travis.yml
index 25a148fd4f..b877e205b5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -332,10 +332,6 @@ after_failure:
fi
ls -la ~/Library/Logs/DiagnosticReports/
cat ~/Library/Logs/DiagnosticReports/*.crash
- if [[ -f brew.log ]]; then
- echo "Homebrew log"
- cat brew.log
- fi
else
COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1)
if [[ -f "$COREFILE" ]]; then
diff --git a/ci/travis_install_osx.sh b/ci/travis_install_osx.sh
index 859d854625..47d6a637f7 100755
--- a/ci/travis_install_osx.sh
+++ b/ci/travis_install_osx.sh
@@ -17,13 +17,18 @@
# specific language governing permissions and limitations
# under the License.
+set -x
set -e
if [ "$ARROW_CI_RUBY_AFFECTED" = "1" ]; then
brew_log_path=brew.log
function run_brew() {
echo brew "$@" >> ${brew_log_path}
- brew "$@" >> ${brew_log_path} 2>&1
+ if ! gtimeout --signal=KILL 5m brew "$@" >> ${brew_log_path} 2>&1; then
+ cat ${brew_log_path}
+ rm ${brew_log_path}
+ false
+ fi
}
run_brew update
run_brew upgrade python