Merge "Add execrise script to devstack"

This commit is contained in:
Jenkins 2014-04-01 18:05:56 +00:00 committed by Gerrit Code Review
commit 29be044af9
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,46 @@
#!/usr/bin/env bash
# **rally.sh**
echo "*********************************************************************"
echo "Begin DevStack Exercise: $0"
echo "*********************************************************************"
# This script exits on an error so that errors don't compound and you see
# only the first error that occurred.
set -o errexit
# Print the commands being run so that we can see the command that triggers
# an error. It is also useful for following allowing as the install occurs.
set -o xtrace
# Settings
# ========
# Keep track of the current directory
EXERCISE_DIR=$(cd $(dirname "$0") && pwd)
TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
# Import common functions
source $TOP_DIR/functions
# Import configuration
source $TOP_DIR/openrc
# Import exercise configuration
source $TOP_DIR/exerciserc
is_service_enabled rally || exit 55
# Import rally functions
source $TOP_DIR/lib/rally
# Run tests
run_all_benchmarks
set +o xtrace
echo "*********************************************************************"
echo "SUCCESS: End DevStack Exercise: $0"
echo "*********************************************************************"

View File

@ -123,6 +123,13 @@ function init_rally() {
fi
}
# Run all benchmarks from samples dir to ensure it all works.
function run_all_benchmarks() {
for CONF in $DEST/rally/doc/samples/tasks/*/*.yaml; do
rally task start --task $CONF
done
}
# Restore xtrace
$XTRACE