From 174d934d52b452f1b7c76d3e8ba58a29423ad051 Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Sun, 4 Dec 2016 08:04:33 +0000 Subject: [PATCH] Initializing java package by update-alternatives --- .travis.yml | 1 + test/integration-test-common.sh | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1beea25..b917910 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ cache: apt before_install: - sudo apt-get update -qq - sudo apt-get install -qq cppcheck libfuse-dev openjdk-7-jdk + - sudo update-alternatives --auto java script: - ./autogen.sh - ./configure diff --git a/test/integration-test-common.sh b/test/integration-test-common.sh index a1c872c..5368cf3 100644 --- a/test/integration-test-common.sh +++ b/test/integration-test-common.sh @@ -99,15 +99,6 @@ function start_s3proxy { else S3PROXY_CONFIG="s3proxy.conf" fi - JAVA_BIN=`which java` - if [ $? -ne 0 ]; then - if [ -f /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java ]; then - JAVA_BIN=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java - else - # not found java command, so probabry gets error by stdbuf command line. - JAVA_BIN=java - fi - fi if [ -n "${S3PROXY_BINARY}" ] then @@ -117,7 +108,7 @@ function start_s3proxy { chmod +x "${S3PROXY_BINARY}" fi - stdbuf -oL -eL ${JAVA_BIN} -jar "$S3PROXY_BINARY" --properties $S3PROXY_CONFIG | stdbuf -oL -eL sed -u "s/^/s3proxy: /" & + stdbuf -oL -eL java -jar "$S3PROXY_BINARY" --properties $S3PROXY_CONFIG | stdbuf -oL -eL sed -u "s/^/s3proxy: /" & # wait for S3Proxy to start for i in $(seq 30);