Multi-test Tempest script
1. Added option to run certain tests via name filtering 2. Added a temporary variable DEVSTACK_PATH for easy local debugging of script Change-Id: I71c25b50a07e21bd6388bf683192def1b7ad45d0
This commit is contained in:
parent
6cec6bbf03
commit
ff07d65d85
@ -14,23 +14,34 @@
|
||||
# under the License.
|
||||
|
||||
sudo chmod -R a+rw /opt/stack/
|
||||
(cd $BASE/new/vitrage/; sudo virtualenv .venv)
|
||||
source $BASE/new/vitrage/.venv/bin/activate
|
||||
DEVSTACK_PATH="$BASE/new"
|
||||
(cd $DEVSTACK_PATH/vitrage/; sudo virtualenv .venv)
|
||||
. $DEVSTACK_PATH/vitrage/.venv/bin/activate
|
||||
|
||||
(cd $BASE/new/tempest/; sudo pip install -r requirements.txt -r test-requirements.txt)
|
||||
sudo pip install nose
|
||||
if [ "$1" = "api" ]; then
|
||||
TESTS="topology"
|
||||
elif [ "$1" = "datasources" ]; then
|
||||
TESTS="datasources"
|
||||
else
|
||||
TESTS="topology"
|
||||
fi
|
||||
|
||||
(cd $BASE/new/tempest/; sudo oslo-config-generator --config-file etc/config-generator.tempest.conf --output-file etc/tempest.conf)
|
||||
(cd $BASE/new/; sudo sh -c 'cat vitrage/devstack/files/tempest/tempest.conf >> tempest/etc/tempest.conf')
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo pip install -r requirements.txt -r test-requirements.txt)
|
||||
|
||||
sudo cp $BASE/new/tempest/etc/logging.conf.sample $BASE/new/tempest/etc/logging.conf
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo oslo-config-generator --config-file etc/config-generator.tempest.conf --output-file etc/tempest.conf)
|
||||
(cd $DEVSTACK_PATH/; sudo sh -c 'cat vitrage/devstack/files/tempest/tempest.conf >> tempest/etc/tempest.conf')
|
||||
|
||||
(cd $BASE/new/vitrage/; sudo pip install -r requirements.txt -r test-requirements.txt)
|
||||
(cd $BASE/new/vitrage/; sudo python setup.py install)
|
||||
sudo cp $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf
|
||||
|
||||
(cd $BASE/new/tempest/; sudo rm -rf .testrepository)
|
||||
(cd $BASE/new/tempest/; sudo testr init)
|
||||
(cd $DEVSTACK_PATH/vitrage/; sudo pip install -r requirements.txt -r test-requirements.txt)
|
||||
(cd $DEVSTACK_PATH/vitrage/; sudo python setup.py install)
|
||||
|
||||
(cd $BASE/new/tempest/; sudo sh -c 'testr list-tests vitrage_tempest_tests')
|
||||
(cd $BASE/new/tempest/; sudo sh -c 'testr list-tests vitrage_tempest_tests | grep -E "topology" > vitrage_tempest_tests.list')
|
||||
(cd $BASE/new/tempest/; sudo sh -c 'testr run --subunit --load-list=vitrage_tempest_tests.list | subunit-trace --fails')
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo rm -rf .testrepository)
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo testr init)
|
||||
|
||||
echo "Listing existing Tempest tests"
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo sh -c 'testr list-tests vitrage_tempest_tests')
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo sh -c 'testr list-tests vitrage_tempest_tests | grep -E '$TESTS' > vitrage_tempest_tests.list')
|
||||
echo "Testing $1: $TESTS..."
|
||||
(cd $DEVSTACK_PATH/tempest/; sudo sh -c 'testr run --subunit --load-list=vitrage_tempest_tests.list | subunit-trace --fails')
|
||||
unset DEVSTACK_PATH
|
||||
|
Loading…
Reference in New Issue
Block a user