Really preseed tempest testrepository from database

Recently support to nodepool was added for pre-seeding the tempest test
repository with data from the subunit2sql db. However the nodepool
script was preseeding the wrong git repo which wasn't used for tempest
in devstack gate runs. This commit loads the stream pulled from the
database by nodepool image creation.

Change-Id: I9ca156b7fcfe25b1052eb250d56ed57943881e9c
This commit is contained in:
Matthew Treinish
2015-01-23 15:17:22 -05:00
parent 2a47c2237d
commit c6073f7f1f

View File

@@ -521,11 +521,19 @@ if [[ "$DEVSTACK_GATE_EXERCISES" -eq "1" ]]; then
fi
if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then
if [[ -f /opt/git/openstack/tempest/.testrepository/0 ]]; then
pushd /opt/stack/new/tempest/
if [[ ! -d /opt/stack/new/tempest/.testrepository ]]; then
sudo testr init
fi
sudo sh -c 'cat /opt/git/openstack/tempest/.testrepository/0 | subunit-1to2 | testr load'
popd
fi
# under tempest isolation tempest will need to write .tox dir, log files
if [[ -d "$BASE/new/tempest" ]]; then
sudo chown -R tempest:stack $BASE/new/tempest
fi
# Make sure tempest user can write to its directory for
# lock-files.
if [[ -d $BASE/data/tempest ]]; then