051075a596
* Splits out the "manager" class into its own file (at least for now to keep the code change size down initially) * Adds base manager classes for Fuzz and Default clients * Adds base test case class and a derived base SmokeTest class * Adds smoke test for basic server operations in compute * Adds non-smoke test for advanced server operations in compute * Adds Whitebox base test case class * New basic db-checking whitebox tests for servers and images This change builds upon the proposed refactoring to the Tempest Manager and base test classes as per https://review.openstack.org/#/c/7069 Change-Id: I12125fffb725cad3a4fef3134c83e55437529252
64 lines
1.3 KiB
Bash
Executable File
64 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
function usage {
|
|
echo "Usage: $0 [OPTION]..."
|
|
echo "Run Tempest test suite"
|
|
echo ""
|
|
echo " -s, --smoke Only run smoke tests"
|
|
echo " -w, --whitebox Only run whitebox tests"
|
|
echo " -p, --pep8 Just run pep8"
|
|
echo " -h, --help Print this usage message"
|
|
echo " -d. --debug Debug this script -- set -o xtrace"
|
|
exit
|
|
}
|
|
|
|
function process_option {
|
|
case "$1" in
|
|
-h|--help) usage;;
|
|
-d|--debug) set -o xtrace;;
|
|
-p|--pep8) let just_pep8=1;;
|
|
-s|--smoke) noseargs="$noseargs --attr=type=smoke";;
|
|
-w|--whitebox) noseargs="$noseargs --attr=type=whitebox";;
|
|
*) noseargs="$noseargs $1"
|
|
esac
|
|
}
|
|
|
|
noseargs="tempest"
|
|
just_pep8=0
|
|
|
|
export NOSE_WITH_OPENSTACK=1
|
|
export NOSE_OPENSTACK_COLOR=1
|
|
export NOSE_OPENSTACK_RED=15.00
|
|
export NOSE_OPENSTACK_YELLOW=3.00
|
|
export NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
export NOSE_OPENSTACK_STDOUT=1
|
|
|
|
for arg in "$@"; do
|
|
process_option $arg
|
|
done
|
|
|
|
function run_tests {
|
|
$NOSETESTS
|
|
}
|
|
|
|
function run_pep8 {
|
|
echo "Running pep8 ..."
|
|
PEP8_EXCLUDE="kong,etc,include,tools"
|
|
PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat"
|
|
PEP8_INCLUDE="."
|
|
pep8 $PEP8_OPTIONS $PEP8_INCLUDE
|
|
}
|
|
|
|
NOSETESTS="nosetests $noseargs"
|
|
|
|
if [ $just_pep8 -eq 1 ]; then
|
|
run_pep8
|
|
exit
|
|
fi
|
|
|
|
run_tests || exit
|
|
|
|
if [ -z "$noseargs" ]; then
|
|
run_pep8
|
|
fi
|