Github user paul-guo- commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/818#discussion_r72555580 --- Diff: src/test/feature/run-feature-test.sh --- @@ -0,0 +1,47 @@ +#! /bin/bash + +if [ x$GPHOME == 'x' ]; then + echo "Please export GPHOME variable." + exit 0 +fi + +PSQL=${GPHOME}/bin/psql +HAWQ_DB=${PGDATABASE:-"postgres"} +HAWQ_HOST=${PGHOST:-"localhost"} +HAWQ_PORT=${PGPORT:-"5432"} + +run_sql() { + $PSQL -d $HAWQ_DB -h $HAWQ_HOST -p $HAWQ_PORT -c "$1" > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$1 failed." + exit 1 + fi +} + +init_hawq_test() { + source "${GPHOME}/greenplum_path.sh" + + TEST_DB_NAME="hawq_feature_test" + + $PSQL -d $HAWQ_DB -h $HAWQ_HOST -p $HAWQ_PORT \ + -c "create database $TEST_DB_NAME;" > /dev/null 2>&1 + run_sql "alter database $TEST_DB_NAME set lc_messages to 'C';" + run_sql "alter database $TEST_DB_NAME set lc_monetary to 'C';" + run_sql "alter database $TEST_DB_NAME set lc_numeric to 'C';" + run_sql "alter database $TEST_DB_NAME set lc_time to 'C';" + run_sql "alter database $TEST_DB_NAME set timezone_abbreviations to 'Default';" + run_sql "alter database $TEST_DB_NAME set timezone to 'PST8PDT';" + run_sql "alter database $TEST_DB_NAME set datestyle to 'postgres,MDY';" + PGDATABASE=$TEST_DB_NAME +} + +run_feature_test() { + if [ $# -lt 2 ] || [ $1 == "--help" ]; then --- End diff -- Add a line in help output to explain what is the script for? (for running in parallel) I suspect '$1 == "--help"' could be removed.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---