Add pre_test_hook.sh

Add pre_test_hook.sh to help generate localrc when
using devstack-gate.

Change-Id: Ieed1beca668c84613a062a6c3418e294df40c7f9
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
Chuck Short 2016-10-13 14:32:07 -04:00
parent 4c0f96179e
commit 3d0d68fcbe
1 changed files with 25 additions and 0 deletions

25
contrib/ci/pre_test_hook.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash -xe
#
# 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.
# This script is executed inside pre_test_hook function in devstack gate.
# First argument ($1) expects boolean as value where:
# 'False' means share driver will not handle share servers
# 'True' means it will handle share servers.
# Import devstack function 'trueorfalse'
source $BASE/new/devstack/functions
localrc_path=$BASE/new/devstack/localrc
echo "LXD_BACKEND_DRIVER=zfs" >> $localrc_path