dec3a4eba1
On target infra nodes there are old tox version, so we need to lower it in library to get an ability to test yaql. At the same time we need to make workaround of nailgun installation due to old pip and tox versions on CI. Change-Id: I4a2512e69d52c3d0b7cd82c656f6c49feb884d0c Partial-Bug: #1588910
36 lines
691 B
Bash
Executable File
36 lines
691 B
Bash
Executable File
#!/bin/bash
|
|
set -eux
|
|
DIR=`dirname $0`
|
|
cd "${DIR}" || exit 1
|
|
|
|
REPO_URL=${NOOP_FIXTURES_REPO_URL:-'https://github.com/openstack/fuel-noop-fixtures.git'}
|
|
clone_fixtures_repo() {
|
|
if ! [ -d 'fuel-noop-fixtures' ]; then
|
|
echo "Cloning the repository..."
|
|
git clone "${REPO_URL}" 'fuel-noop-fixtures'
|
|
fi
|
|
}
|
|
|
|
link_yaql_fixtures() {
|
|
if ! [ -L 'fixtures' ]; then
|
|
echo "Linking repo fixtures to the local FS..."
|
|
ln -sf 'fuel-noop-fixtures/yaql' 'fixtures'
|
|
fi
|
|
}
|
|
|
|
check_tox() {
|
|
type tox >/dev/null 2>&1 || { echo >&2 "Tox is required to be installed to run tests."; exit 1; }
|
|
}
|
|
|
|
run_tox() {
|
|
echo "Run tests..."
|
|
tox
|
|
}
|
|
|
|
check_tox
|
|
clone_fixtures_repo
|
|
link_yaql_fixtures
|
|
run_tox
|
|
|
|
|