Added a fix to run this script from zuul.
Description: - While running tests using zuul, we are cloning repositories inside zuul configuration. To handle this, created "clone_repos.sh" which contains cloning logic. Change-Id: Ic94df88f48d147c190fd9699aeebb13b6adb156f
This commit is contained in:
parent
f9af3a8d2b
commit
ece3139e2d
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
# Copyright (c) 2017 Platform9 Systems Inc.
|
||||
#
|
||||
# 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 expressed or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
WORKSPACE=$(pwd)
|
||||
DIRECTORY="$WORKSPACE/openstack"
|
||||
|
||||
mkdir $DIRECTORY
|
||||
|
||||
clone_repos() {
|
||||
project=$1
|
||||
git clone -b stable/newton --depth 1 https://github.com/openstack/$project.git $DIRECTORY/$project
|
||||
}
|
||||
|
||||
echo "============Cloning repos============"
|
||||
clone_repos cinder &
|
||||
clone_repos nova &
|
||||
clone_repos glance_store &
|
||||
clone_repos neutron &
|
||||
wait
|
20
run_tests.sh
20
run_tests.sh
|
@ -20,10 +20,6 @@ case $key in
|
|||
-wj) JENKINSRUN=false;;
|
||||
esac
|
||||
|
||||
if [ -d "$DIRECTORY" ]; then
|
||||
rm -rf $DIRECTORY
|
||||
fi
|
||||
|
||||
if [ "$JENKINSRUN" = true ]; then
|
||||
export OMNI_DIR="$BASE/new/omni"
|
||||
sudo chown -R jenkins:stack $OMNI_DIR
|
||||
|
@ -31,20 +27,13 @@ if [ "$JENKINSRUN" = true ]; then
|
|||
fi
|
||||
|
||||
WORKSPACE=$(pwd)
|
||||
DIRECTORY="$WORKSPACE/omnitests"
|
||||
DIRECTORY="$WORKSPACE/openstack"
|
||||
GCE_TEST="test_gce"
|
||||
AWS_TEST="test_ec2"
|
||||
declare -A results
|
||||
declare -i fail
|
||||
declare -i pass
|
||||
|
||||
mkdir $DIRECTORY
|
||||
|
||||
clone_repos() {
|
||||
project=$1
|
||||
git clone -b stable/newton --depth 1 https://github.com/openstack/$project.git $DIRECTORY/$project
|
||||
}
|
||||
|
||||
copy_cinder_files() {
|
||||
cp -R $WORKSPACE/cinder/tests/unit/volume/drivers/ $DIRECTORY/cinder/cinder/tests/unit/volume/
|
||||
cp -R $WORKSPACE/cinder/volume/drivers/ $DIRECTORY/cinder/cinder/volume/
|
||||
|
@ -92,13 +81,6 @@ check_results() {
|
|||
fi
|
||||
}
|
||||
|
||||
echo "============Cloning repos============"
|
||||
clone_repos cinder &
|
||||
clone_repos nova &
|
||||
clone_repos glance_store &
|
||||
clone_repos neutron &
|
||||
wait
|
||||
|
||||
copy_cinder_files
|
||||
copy_nova_files
|
||||
copy_glance_files
|
||||
|
|
Loading…
Reference in New Issue