#!/bin/bash # # Copyright 2013 Rackspace Australia # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # $1 is the unique job id # $2 is the working dir path # $3 is the path to the git repo path # $4 is the nova db user # $5 is the nova db password # $6 is the nova db name # $7 is the path to the seed dataset to test against # $8 is the logging.conf for openstack # $9 is the pip cache dir UNIQUE_ID=$1 WORKING_DIR_PATH=$2 GIT_REPO_PATH=$3 DB_USER=$4 DB_PASS=$5 DB_NAME=$6 DATASET_SEED_SQL=$7 LOG_CONF_FILE=$8 PIP_CACHE_DIR=$9 # We also support the following environment variables to tweak our behavour: # NOCLEANUP: if set to anything, don't cleanup at the end of the run pip_requires() { pip install -q mysql-python pip install -q eventlet requires="tools/pip-requires" if [ ! -e $requires ] then requires="requirements.txt" fi echo "Install pip requirements from $requires" pip install -q -r $requires echo "Requirements installed" } db_sync() { # $1 is the test target (ie branch name) # $2 is an (optional) destination version number # Create a nova.conf file cat - > $WORKING_DIR_PATH/nova-$1.conf <