predictionio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject incubator-predictionio git commit: [PIO-53] More fixes
Date Sat, 18 Feb 2017 23:55:48 GMT
Repository: incubator-predictionio
Updated Branches:
  refs/heads/develop 09504bdb0 -> b7d8815e1


[PIO-53] More fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/b7d8815e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/b7d8815e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/b7d8815e

Branch: refs/heads/develop
Commit: b7d8815e1913c5a204f0316648d9f9c15d68c004
Parents: 09504bd
Author: Donald Szeto <donald@apache.org>
Authored: Sat Feb 18 15:55:29 2017 -0800
Committer: Donald Szeto <donald@apache.org>
Committed: Sat Feb 18 15:55:29 2017 -0800

----------------------------------------------------------------------
 tests/Dockerfile              |  2 +-
 tests/before_script.travis.sh |  1 -
 tests/docker-files/init.sh    | 41 +++-----------------------------------
 tests/run_docker.sh           | 18 +++++++++++------
 tests/script.travis.sh        |  4 ++--
 5 files changed, 18 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/b7d8815e/tests/Dockerfile
----------------------------------------------------------------------
diff --git a/tests/Dockerfile b/tests/Dockerfile
index 4d74865..9f4decd 100644
--- a/tests/Dockerfile
+++ b/tests/Dockerfile
@@ -27,7 +27,7 @@ ENV SPARK_HOME /vendors/spark-${SPARK_VERSION}-bin-hadoop2.6
 COPY docker-files/postgresql-9.4-1204.jdbc41.jar /drivers
 COPY docker-files/init.sh init.sh
 COPY docker-files/env-conf/hbase-site.xml ${PIO_HOME}/conf/hbase-site.xml
-COPY docker-files/env-conf/pio-env.sh /pio-env.sh
+COPY docker-files/env-conf/pio-env.sh ${PIO_HOME}/conf/pio-env.sh
 COPY docker-files/wait-for-postgres.sh /wait-for-postgres.sh
 COPY docker-files/pgpass /root/.pgpass
 RUN chmod 600 /root/.pgpass

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/b7d8815e/tests/before_script.travis.sh
----------------------------------------------------------------------
diff --git a/tests/before_script.travis.sh b/tests/before_script.travis.sh
index b68e68b..b6d3966 100755
--- a/tests/before_script.travis.sh
+++ b/tests/before_script.travis.sh
@@ -16,5 +16,4 @@
 # limitations under the License.
 #
 
-./make-distribution.sh
 tests/build-docker.sh

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/b7d8815e/tests/docker-files/init.sh
----------------------------------------------------------------------
diff --git a/tests/docker-files/init.sh b/tests/docker-files/init.sh
index dc74ada..af68f1b 100755
--- a/tests/docker-files/init.sh
+++ b/tests/docker-files/init.sh
@@ -16,42 +16,7 @@
 # limitations under the License.
 #
 
-#set -e
-
-#echo '== Setting up Postgres... =='
-#service postgresql start
-#runuser postgres -c 'createuser -s root'
-#createdb root
-/wait-for-postgres.sh postgres
-
-#psql -c "create user pio with password 'pio'" && createdb pio
-
-#echo '== Starting SSH... =='
-#/etc/init.d/sshd start
-#ssh-keygen -b 2048 -t rsa -q -f /root/.ssh/id_rsa -N ""
-#cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
-
-#echo '== Starting HBase... =='
-#$HBASE_HOME/bin/start-hbase.sh
-
-#echo '== Starting standalone Spark cluster... =='
-#$SPARK_HOME/sbin/start-all.sh
-
-#echo '== Starting Elasticsearch... =='
-#$ELASTICSEARCH_HOME/bin/elasticsearch -d -p $PIO_HOME/es.pid
-
-#echo '== Copying distribution to PIO_HOME... =='
-#DISTRIBUTION_TAR=`find /pio_host -maxdepth 1 -name PredictionIO-*.tar.gz | head -1`
-#tar zxvfC $DISTRIBUTION_TAR /
-#DIR_NAME=/`basename $DISTRIBUTION_TAR`
-#DIR_NAME=${DIR_NAME%.tar.gz}
-#mv $DIR_NAME/* $PIO_HOME/
-mv /pio-env.sh $PIO_HOME/conf/pio-env.sh
-
-#echo '== Copying tests to a separate directory =='
-#mkdir /tests
-#cp -r /pio_host/tests/pio_tests /tests/pio_tests
-export PYTHONPATH=/tests:$PYTHONPATH
-
-# after initialization run given command
+set -e
+/wait-for-postgres.sh postgres /bin/true
+export PYTHONPATH=/$PIO_HOME/tests:$PYTHONPATH
 eval $@

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/b7d8815e/tests/run_docker.sh
----------------------------------------------------------------------
diff --git a/tests/run_docker.sh b/tests/run_docker.sh
index c60fb7e..9f28d1c 100755
--- a/tests/run_docker.sh
+++ b/tests/run_docker.sh
@@ -27,21 +27,27 @@ if ! [[ "$1" =~ ^(PGSQL|ELASTICSEARCH)$ ]]; then
   echo "$USAGE"
   exit 1
 fi
+META="$1"
+shift
 
-if ! [[ "$2" =~ ^(PGSQL|HBASE)$ ]]; then
+if ! [[ "$1" =~ ^(PGSQL|HBASE)$ ]]; then
   echo "$USAGE"
   exit 1
 fi
+EVENT="$1"
+shift
 
-if ! [[ "$3" =~ ^(PGSQL|LOCALFS|HDFS)$ ]]; then
+if ! [[ "$1" =~ ^(PGSQL|LOCALFS|HDFS)$ ]]; then
   echo "$USAGE"
   exit 1
 fi
+MODEL="$1"
+shift
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 docker-compose -f $DIR/docker-compose.yml run \
-  -e PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=$1 \
-  -e PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE=$2 \
-  -e PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=$3 \
-  pio-testing $4
+  -e PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=$META \
+  -e PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE=$EVENT \
+  -e PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=$MODEL \
+  pio-testing $@

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/b7d8815e/tests/script.travis.sh
----------------------------------------------------------------------
diff --git a/tests/script.travis.sh b/tests/script.travis.sh
index 0f2af4c..db69413 100755
--- a/tests/script.travis.sh
+++ b/tests/script.travis.sh
@@ -18,8 +18,8 @@
 
 if [[ $BUILD_TYPE == Unit ]]; then
   ./tests/run_docker.sh $METADATA_REP $EVENTDATA_REP $MODELDATA_REP \
-    '/PredictionIO/tests/unit.sh'
+    /PredictionIO/tests/unit.sh
 else
   ./tests/run_docker.sh $METADATA_REP $EVENTDATA_REP $MODELDATA_REP \
-    'python3 /PredictionIO/tests/pio_tests/tests.py'
+    python3 /PredictionIO/tests/pio_tests/tests.py
 fi


Mime
View raw message