Clean up bashate failures

Also create tools/run-bashate.sh to wrap a find command to search for
files to run bashate on, and use it in tox.

Change-Id: I5ab07425f566a556f158a4b76b00aa35f9fb4385
This commit is contained in:
K Jonathan Harker
2014-09-29 13:28:19 -07:00
parent b4a308c445
commit 2f03cf35e5
28 changed files with 192 additions and 260 deletions

View File

@@ -12,7 +12,7 @@ GIT_HOST="review.openstack.org:29418"
PROJECT_PREFIX="openstack" PROJECT_PREFIX="openstack"
if [[ ! -e ${PROJECT} ]]; then if [[ ! -e ${PROJECT} ]]; then
git clone ssh://$GIT_HOST/$PROJECT_PREFIX/$PROJECT git clone ssh://$GIT_HOST/$PROJECT_PREFIX/$PROJECT
fi fi
cd $PROJECT cd $PROJECT
git checkout master git checkout master
@@ -23,15 +23,15 @@ git fetch origin +refs/meta/*:refs/remotes/meta/*
# Checkout or create the meta/openstack/release branch # Checkout or create the meta/openstack/release branch
if ! { git branch -a |grep ^[[:space:]]*remotes/meta/openstack/release$; } if ! { git branch -a |grep ^[[:space:]]*remotes/meta/openstack/release$; }
then then
git checkout --orphan release git checkout --orphan release
# Delete everything so the first commit is truly empty: # Delete everything so the first commit is truly empty:
git rm -rf . git rm -rf .
# git rm -rf leaves submodule directories: # git rm -rf leaves submodule directories:
find -maxdepth 1 -not -regex '\./\.git\(/.*\)?' -not -name . -exec rm -fr {} \; find -maxdepth 1 -not -regex '\./\.git\(/.*\)?' -not -name . -exec rm -fr {} \;
ls -la ls -la
else else
git branch -D release || /bin/true git branch -D release || /bin/true
git checkout -b release remotes/meta/openstack/release git checkout -b release remotes/meta/openstack/release
fi fi
# Normally a branch name will just be a file, but we can have branches # Normally a branch name will just be a file, but we can have branches
@@ -40,12 +40,11 @@ fi
mkdir -p `dirname $BRANCH` mkdir -p `dirname $BRANCH`
# Read and update the value for the branch # Read and update the value for the branch
if [ -e "$BRANCH" ] if [ -e "$BRANCH" ]; then
then echo "Current contents of ${BRANCH}:"
echo "Current contents of ${BRANCH}:" cat "${BRANCH}"
cat "${BRANCH}"
else else
echo "${BRANCH} does not exist. Creating it." echo "${BRANCH} does not exist. Creating it."
fi fi
echo "Updating ${BRANCH} to read $VALUE" echo "Updating ${BRANCH} to read $VALUE"

View File

@@ -15,8 +15,7 @@
# under the License. # under the License.
# Initial transifex setup # Initial transifex setup
function setup_translation () function setup_translation {
{
# Track in HAS_CONFIG whether we run "tx init" since calling it # Track in HAS_CONFIG whether we run "tx init" since calling it
# will add the file .tx/config - and "tx set" might update it. If # will add the file .tx/config - and "tx set" might update it. If
# "tx set" updates .tx/config, we need to handle the file if it # "tx set" updates .tx/config, we need to handle the file if it
@@ -31,8 +30,7 @@ function setup_translation ()
} }
# Setup a project for transifex # Setup a project for transifex
function setup_project () function setup_project {
{
local project=$1 local project=$1
# Transifex project name does not include "." # Transifex project name does not include "."
@@ -45,8 +43,7 @@ function setup_project ()
} }
# Setup project horizon for transifex # Setup project horizon for transifex
function setup_horizon () function setup_horizon {
{
local project=horizon local project=horizon
# Horizon JavaScript Translations # Horizon JavaScript Translations
@@ -72,8 +69,7 @@ function setup_horizon ()
} }
# Set global variable DocFolder for manuals projects # Set global variable DocFolder for manuals projects
function init_manuals () function init_manuals {
{
project=$1 project=$1
DocFolder="doc" DocFolder="doc"
@@ -84,46 +80,38 @@ function init_manuals ()
# Setup project manuals projects (api-site, openstack-manuals, # Setup project manuals projects (api-site, openstack-manuals,
# operations-guide) for transifex # operations-guide) for transifex
function setup_manuals () function setup_manuals {
{
local project=$1 local project=$1
# Generate pot one by one # Generate pot one by one
for FILE in ${DocFolder}/* for FILE in ${DocFolder}/*; do
do
# Skip non-directories # Skip non-directories
if [ ! -d $FILE ] if [ ! -d $FILE ]; then
then
continue continue
fi fi
DOCNAME=${FILE#${DocFolder}/} DOCNAME=${FILE#${DocFolder}/}
# Ignore directories that will not get translated # Ignore directories that will not get translated
if [ "$DOCNAME" == "www" -o "$DOCNAME" == "tools" -o "$DOCNAME" == "generated" -o "$DOCNAME" == "publish-docs" ] if [ "$DOCNAME" == "www" -o "$DOCNAME" == "tools" -o "$DOCNAME" == "generated" -o "$DOCNAME" == "publish-docs" ]; then
then
continue continue
fi fi
# Skip glossary in all repos besides openstack-manuals. # Skip glossary in all repos besides openstack-manuals.
if [ "$project" != "openstack-manuals" -a "$DOCNAME" == "glossary" ] if [ "$project" != "openstack-manuals" -a "$DOCNAME" == "glossary" ]; then
then
continue continue
fi fi
# Minimum amount of translation done, 75 % by default. # Minimum amount of translation done, 75 % by default.
PERC=75 PERC=75
if [ "$project" == "openstack-manuals" ] if [ "$project" == "openstack-manuals" ]; then
then
# The common and glossary directories are used by the # The common and glossary directories are used by the
# other guides, let's be more liberal here since teams # other guides, let's be more liberal here since teams
# might only translate the files used by a single # might only translate the files used by a single
# guide. We use 8 % since that downloads the currently # guide. We use 8 % since that downloads the currently
# translated files. # translated files.
if [ "$DOCNAME" == "common" -o "$DOCNAME" == "glossary" ] if [ "$DOCNAME" == "common" -o "$DOCNAME" == "glossary" ]; then
then
PERC=8 PERC=8
fi fi
fi fi
# Update the .pot file # Update the .pot file
./tools/generatepot ${DOCNAME} ./tools/generatepot ${DOCNAME}
if [ -f ${DocFolder}/${DOCNAME}/locale/${DOCNAME}.pot ] if [ -f ${DocFolder}/${DOCNAME}/locale/${DOCNAME}.pot ]; then
then
# Add all changed files to git # Add all changed files to git
git add ${DocFolder}/${DOCNAME}/locale/* git add ${DocFolder}/${DOCNAME}/locale/*
# Set auto-local # Set auto-local
@@ -138,8 +126,7 @@ function setup_manuals ()
} }
# Setup git so that git review works # Setup git so that git review works
function setup_git () function setup_git {
{
git config user.name "OpenStack Proposal Bot" git config user.name "OpenStack Proposal Bot"
git config user.email "openstack-infra@lists.openstack.org" git config user.email "openstack-infra@lists.openstack.org"
git config gitreview.username "proposal-bot" git config gitreview.username "proposal-bot"
@@ -147,8 +134,7 @@ function setup_git ()
# Setup project so that git review works, sets global variable # Setup project so that git review works, sets global variable
# COMMIT_MSG. # COMMIT_MSG.
function setup_review () function setup_review {
{
FULL_PROJECT=$(grep project .gitreview | cut -f2 -d= |sed -e 's/\.git$//') FULL_PROJECT=$(grep project .gitreview | cut -f2 -d= |sed -e 's/\.git$//')
COMMIT_MSG="Imported Translations from Transifex" COMMIT_MSG="Imported Translations from Transifex"
@@ -199,19 +185,16 @@ EOF
} }
# Propose patch using COMMIT_MSG # Propose patch using COMMIT_MSG
function send_patch () function send_patch {
{
# Revert any changes done to .tx/config # Revert any changes done to .tx/config
if [ $HAS_CONFIG -eq 1 ] if [ $HAS_CONFIG -eq 1 ]; then
then
git reset -q .tx/config git reset -q .tx/config
git checkout -- .tx/config git checkout -- .tx/config
fi fi
# Don't send a review if nothing has changed. # Don't send a review if nothing has changed.
if [ `git diff --cached |wc -l` -gt 0 ] if [ `git diff --cached |wc -l` -gt 0 ]; then
then
# Commit and review # Commit and review
git commit -F- <<EOF git commit -F- <<EOF
$COMMIT_MSG $COMMIT_MSG
@@ -222,8 +205,7 @@ EOF
} }
# Setup global variables LEVELS and LKEYWORDS # Setup global variables LEVELS and LKEYWORDS
function setup_loglevel_vars () function setup_loglevel_vars {
{
# Strings for various log levels # Strings for various log levels
LEVELS="info warning error critical" LEVELS="info warning error critical"
# Keywords for each log level: # Keywords for each log level:
@@ -236,8 +218,7 @@ function setup_loglevel_vars ()
# Setup transifex configuration for log level message translation. # Setup transifex configuration for log level message translation.
# Needs variables setup via setup_loglevel_vars. # Needs variables setup via setup_loglevel_vars.
function setup_loglevel_project () function setup_loglevel_project {
{
project=$1 project=$1
# Transifex project name does not include "." # Transifex project name does not include "."
@@ -246,8 +227,7 @@ function setup_loglevel_project ()
for level in $LEVELS ; do for level in $LEVELS ; do
# Bootstrapping: Create file if it does not exist yet, # Bootstrapping: Create file if it does not exist yet,
# otherwise "tx set" will fail. # otherwise "tx set" will fail.
if [ ! -e ${project}/locale/${project}-log-${level}.pot ] if [ ! -e ${project}/locale/${project}-log-${level}.pot ]; then
then
touch ${project}/locale/${project}-log-${level}.pot touch ${project}/locale/${project}-log-${level}.pot
fi fi
tx set --auto-local -r ${tx_project}.${tx_project}-log-${level}-translations \ tx set --auto-local -r ${tx_project}.${tx_project}-log-${level}-translations \
@@ -260,8 +240,7 @@ function setup_loglevel_project ()
# Run extract_messages for user visible messages and log messages. # Run extract_messages for user visible messages and log messages.
# Needs variables setup via setup_loglevel_vars. # Needs variables setup via setup_loglevel_vars.
function extract_messages_log () function extract_messages_log {
{
project=$1 project=$1
# Update the .pot files # Update the .pot files
@@ -274,8 +253,7 @@ function extract_messages_log ()
} }
# Setup project django_openstack_auth for transifex # Setup project django_openstack_auth for transifex
function setup_django_openstack_auth () function setup_django_openstack_auth {
{
tx set --auto-local -r horizon.djangopo \ tx set --auto-local -r horizon.djangopo \
"openstack_auth/locale/<lang>/LC_MESSAGES/django.po" \ "openstack_auth/locale/<lang>/LC_MESSAGES/django.po" \
--source-lang en \ --source-lang en \
@@ -284,11 +262,9 @@ function setup_django_openstack_auth ()
} }
# Filter out files that we do not want to commit # Filter out files that we do not want to commit
function filter_commits () function filter_commits {
{
# Don't add new empty files. # Don't add new empty files.
for f in `git diff --cached --name-only --diff-filter=A` for f in `git diff --cached --name-only --diff-filter=A`; do
do
# Files should have at least one non-empty msgid string. # Files should have at least one non-empty msgid string.
if ! grep -q 'msgid "[^"]' "$f" ; then if ! grep -q 'msgid "[^"]' "$f" ; then
git reset -q "$f" git reset -q "$f"
@@ -301,16 +277,14 @@ function filter_commits ()
# comment lines, or diff file information. # comment lines, or diff file information.
# Also, don't send files if only .pot files would be changed. # Also, don't send files if only .pot files would be changed.
PO_CHANGE=0 PO_CHANGE=0
for f in `git diff --cached --name-only` for f in `git diff --cached --name-only`; do
do
# It's ok if the grep fails # It's ok if the grep fails
set +e set +e
changed=$(git diff --cached "$f" \ changed=$(git diff --cached "$f" \
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date)" \ | egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date)" \
| egrep -c "^([-+][^-+#])") | egrep -c "^([-+][^-+#])")
set -e set -e
if [ $changed -eq 0 ] if [ $changed -eq 0 ]; then
then
git reset -q "$f" git reset -q "$f"
git checkout -- "$f" git checkout -- "$f"
# Check for all files endig with ".po" # Check for all files endig with ".po"

View File

@@ -1,9 +1,8 @@
#!/bin/bash -xe #!/bin/bash -xe
if [ -z "$PROJECT" ] if [ -z "$PROJECT" ]; then
then echo '$PROJECT not set.'
echo '$PROJECT not set.' exit 1
exit 1
fi fi
case "$ZUUL_REFNAME" in case "$ZUUL_REFNAME" in
@@ -33,8 +32,7 @@ tarball="$(echo dist/$PROJECT*.tar.gz)"
version="${tarball%.tar.gz}" version="${tarball%.tar.gz}"
version="${version#*$PROJECT-}" version="${version#*$PROJECT-}"
base_version=$version base_version=$version
if [ -n "${EXTRAVERSION}" ] if [ -n "${EXTRAVERSION}" ]; then
then
version="${version%~*}${EXTRAVERSION}~${version#*~}" version="${version%~*}${EXTRAVERSION}~${version#*~}"
fi fi
tar xvzf "${tarball}" tar xvzf "${tarball}"
@@ -50,8 +48,7 @@ ln -s "${tarball}" "${PROJECT}_${version}.orig.tar.gz"
echo bzr checkout -r ${PACKAGING_REVNO} --lightweight $BZR_BRANCH $PROJECT-* echo bzr checkout -r ${PACKAGING_REVNO} --lightweight $BZR_BRANCH $PROJECT-*
bzr checkout -r ${PACKAGING_REVNO} --lightweight $BZR_BRANCH $PROJECT-* bzr checkout -r ${PACKAGING_REVNO} --lightweight $BZR_BRANCH $PROJECT-*
cd $PROJECT-* cd $PROJECT-*
if [ -d .git ] if [ -d .git ]; then
then
PACKAGING_REVNO="$(git log --oneline | wc -l)" PACKAGING_REVNO="$(git log --oneline | wc -l)"
rm -rf .git rm -rf .git
else else
@@ -68,10 +65,8 @@ buildno=$BUILD_NUMBER
pkgversion="${version}-0ubuntu0~${series}${buildno}" pkgversion="${version}-0ubuntu0~${series}${buildno}"
dch -b --force-distribution --v "${pkgversion}" "Automated PPA build. Packaging revision: ${PACKAGING_REVNO}." -D $series dch -b --force-distribution --v "${pkgversion}" "Automated PPA build. Packaging revision: ${PACKAGING_REVNO}." -D $series
dpkg-buildpackage -rfakeroot -S -sa -nc -k32EE128C dpkg-buildpackage -rfakeroot -S -sa -nc -k32EE128C
if ! [ "$DO_UPLOAD" = "no" ] if ! [ "$DO_UPLOAD" = "no" ]; then
then for ppa in $PPAS; do
for ppa in $PPAS
do
dput --force $ppa "../${PROJECT}_${pkgversion}_source.changes" dput --force $ppa "../${PROJECT}_${pkgversion}_source.changes"
done done
fi fi

View File

@@ -3,29 +3,24 @@
GERRIT_SITE=$1 GERRIT_SITE=$1
GIT_ORIGIN=$2 GIT_ORIGIN=$2
if [ -z "$GERRIT_SITE" ] if [ -z "$GERRIT_SITE" ]; then
then echo "The gerrit site name (eg 'https://review.openstack.org') must be the first argument."
echo "The gerrit site name (eg 'https://review.openstack.org') must be the first argument." exit 1
exit 1
fi fi
if [ -z "$ZUUL_URL" ] if [ -z "$ZUUL_URL" ]; then
then echo "The ZUUL_URL must be provided."
echo "The ZUUL_URL must be provided." exit 1
exit 1
fi fi
if [ -z "$GIT_ORIGIN" ] || [ -n "$ZUUL_NEWREV" ] if [ -z "$GIT_ORIGIN" ] || [ -n "$ZUUL_NEWREV" ]; then
then
GIT_ORIGIN="$GERRIT_SITE/p" GIT_ORIGIN="$GERRIT_SITE/p"
# git://git.openstack.org/ # git://git.openstack.org/
# https://review.openstack.org/p # https://review.openstack.org/p
fi fi
if [ -z "$ZUUL_REF" ] if [ -z "$ZUUL_REF" ]; then
then if [ -n "$BRANCH" ]; then
if [ -n "$BRANCH" ]
then
echo "No ZUUL_REF so using requested branch $BRANCH from origin." echo "No ZUUL_REF so using requested branch $BRANCH from origin."
ZUUL_REF=$BRANCH ZUUL_REF=$BRANCH
# use the origin since zuul mergers have outdated branches # use the origin since zuul mergers have outdated branches
@@ -36,18 +31,15 @@ then
fi fi
fi fi
if [ ! -z "$ZUUL_CHANGE" ] if [ ! -z "$ZUUL_CHANGE" ]; then
then
echo "Triggered by: $GERRIT_SITE/$ZUUL_CHANGE" echo "Triggered by: $GERRIT_SITE/$ZUUL_CHANGE"
fi fi
set -x set -x
if [[ ! -e .git ]] if [[ ! -e .git ]]; then
then
ls -a ls -a
rm -fr .[^.]* * rm -fr .[^.]* *
if [ -d /opt/git/$ZUUL_PROJECT/.git ] if [ -d /opt/git/$ZUUL_PROJECT/.git ]; then
then
git clone file:///opt/git/$ZUUL_PROJECT . git clone file:///opt/git/$ZUUL_PROJECT .
else else
git clone $GIT_ORIGIN/$ZUUL_PROJECT . git clone $GIT_ORIGIN/$ZUUL_PROJECT .
@@ -56,8 +48,7 @@ fi
git remote set-url origin $GIT_ORIGIN/$ZUUL_PROJECT git remote set-url origin $GIT_ORIGIN/$ZUUL_PROJECT
# attempt to work around bugs 925790 and 1229352 # attempt to work around bugs 925790 and 1229352
if ! git remote update if ! git remote update; then
then
echo "The remote update failed, so garbage collecting before trying again." echo "The remote update failed, so garbage collecting before trying again."
git gc git gc
git remote update git remote update
@@ -69,13 +60,11 @@ if ! git clean -x -f -d -q ; then
git clean -x -f -d -q git clean -x -f -d -q
fi fi
if echo "$ZUUL_REF" | grep -q ^refs/tags/ if echo "$ZUUL_REF" | grep -q ^refs/tags/; then
then
git fetch --tags $ZUUL_URL/$ZUUL_PROJECT git fetch --tags $ZUUL_URL/$ZUUL_PROJECT
git checkout $ZUUL_REF git checkout $ZUUL_REF
git reset --hard $ZUUL_REF git reset --hard $ZUUL_REF
elif [ -z "$ZUUL_NEWREV" ] elif [ -z "$ZUUL_NEWREV" ]; then
then
git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF
git checkout FETCH_HEAD git checkout FETCH_HEAD
git reset --hard FETCH_HEAD git reset --hard FETCH_HEAD
@@ -89,8 +78,7 @@ if ! git clean -x -f -d -q ; then
git clean -x -f -d -q git clean -x -f -d -q
fi fi
if [ -f .gitmodules ] if [ -f .gitmodules ]; then
then
git submodule init git submodule init
git submodule sync git submodule sync
git submodule update --init git submodule update --init

View File

@@ -20,43 +20,40 @@
case $( facter osfamily ) in case $( facter osfamily ) in
Debian) Debian)
PATTERN="sudo.*jenkins.*:.*incorrect password attempts" PATTERN="sudo.*jenkins.*:.*incorrect password attempts"
OLDLOGFILE=/var/log/auth.log.1 OLDLOGFILE=/var/log/auth.log.1
LOGFILE=/var/log/auth.log LOGFILE=/var/log/auth.log
;; ;;
RedHat) RedHat)
PATTERN="sudo.*jenkins.*:.*command not allowed" PATTERN="sudo.*jenkins.*:.*command not allowed"
OLDLOGFILE=$( ls /var/log/secure-* | sort | tail -n1 ) OLDLOGFILE=$( ls /var/log/secure-* | sort | tail -n1 )
LOGFILE=/var/log/secure LOGFILE=/var/log/secure
;; ;;
esac esac
case "$1" in case "$1" in
pre) pre)
rm -fr /tmp/jenkins-sudo-log rm -fr /tmp/jenkins-sudo-log
mkdir /tmp/jenkins-sudo-log mkdir /tmp/jenkins-sudo-log
if [ -f $OLDLOGFILE ] if [ -f $OLDLOGFILE ]; then
then stat -c %Y $OLDLOGFILE > /tmp/jenkins-sudo-log/mtime-pre
stat -c %Y $OLDLOGFILE > /tmp/jenkins-sudo-log/mtime-pre else
else echo "0" > /tmp/jenkins-sudo-log/mtime-pre
echo "0" > /tmp/jenkins-sudo-log/mtime-pre fi
fi grep -h "$PATTERN" $LOGFILE > /tmp/jenkins-sudo-log/pre
grep -h "$PATTERN" $LOGFILE > /tmp/jenkins-sudo-log/pre exit 0
exit 0 ;;
;;
post) post)
if [ -f $OLDLOGFILE ] if [ -f $OLDLOGFILE ]; then
then stat -c %Y $OLDLOGFILE > /tmp/jenkins-sudo-log/mtime-post
stat -c %Y $OLDLOGFILE > /tmp/jenkins-sudo-log/mtime-post else
else echo "0" > /tmp/jenkins-sudo-log/mtime-post
echo "0" > /tmp/jenkins-sudo-log/mtime-post fi
fi if ! diff /tmp/jenkins-sudo-log/mtime-pre /tmp/jenkins-sudo-log/mtime-post > /dev/null; then
if ! diff /tmp/jenkins-sudo-log/mtime-pre /tmp/jenkins-sudo-log/mtime-post > /dev/null echo "diff"
then grep -h "$PATTERN" $OLDLOGFILE > /tmp/jenkins-sudo-log/post
echo "diff" fi
grep -h "$PATTERN" $OLDLOGFILE > /tmp/jenkins-sudo-log/post grep -h "$PATTERN" $LOGFILE >> /tmp/jenkins-sudo-log/post
fi diff /tmp/jenkins-sudo-log/pre /tmp/jenkins-sudo-log/post
grep -h "$PATTERN" $LOGFILE >> /tmp/jenkins-sudo-log/post ;;
diff /tmp/jenkins-sudo-log/pre /tmp/jenkins-sudo-log/post
;;
esac esac

View File

@@ -9,4 +9,4 @@ cat >bootstrap/environment.php <<EOF
}); });
EOF EOF
curl -s https://getcomposer.org/installer | /usr/bin/php curl -s https://getcomposer.org/installer | /usr/bin/php
php composer.phar install --prefer-dist php composer.phar install --prefer-dist

View File

@@ -32,8 +32,7 @@ tx pull -a -f --minimum-perc=75
extract_messages_log "$PROJECT" extract_messages_log "$PROJECT"
PO_FILES=`find ${PROJECT}/locale -name "${PROJECT}.po"` PO_FILES=`find ${PROJECT}/locale -name "${PROJECT}.po"`
if [ -n "$PO_FILES" ] if [ -n "$PO_FILES" ]; then
then
# Use updated .pot file to update translations # Use updated .pot file to update translations
python setup.py update_catalog --no-fuzzy-matching --ignore-obsolete=true python setup.py update_catalog --no-fuzzy-matching --ignore-obsolete=true
fi fi
@@ -42,20 +41,19 @@ fi
# add the messages with the default keywords. Therefore use msgmerge # add the messages with the default keywords. Therefore use msgmerge
# directly. # directly.
for level in $LEVELS ; do for level in $LEVELS ; do
PO_FILES=`find ${PROJECT}/locale -name "${PROJECT}-log-${level}.po"` PO_FILES=`find ${PROJECT}/locale -name "${PROJECT}-log-${level}.po"`
if [ -n "$PO_FILES" ] if [ -n "$PO_FILES" ]; then
then for f in $PO_FILES ; do
for f in $PO_FILES ; do echo "Updating $f"
echo "Updating $f" msgmerge --update --no-fuzzy-matching $f \
msgmerge --update --no-fuzzy-matching $f \ --backup=none \
--backup=none \ ${PROJECT}/locale/${PROJECT}-log-${level}.pot
${PROJECT}/locale/${PROJECT}-log-${level}.pot # Remove obsolete entries
# Remove obsolete entries msgattrib --no-obsolete --force-po \
msgattrib --no-obsolete --force-po \ --output-file=${f}.tmp ${f}
--output-file=${f}.tmp ${f} mv ${f}.tmp ${f}
mv ${f}.tmp ${f} done
done fi
fi
done done
# #

View File

@@ -29,8 +29,7 @@ tx pull -a -f --minimum-perc=75
# Update the .pot file # Update the .pot file
python setup.py extract_messages python setup.py extract_messages
PO_FILES=`find openstack_auth/locale -name '*.po'` PO_FILES=`find openstack_auth/locale -name '*.po'`
if [ -n "$PO_FILES" ] if [ -n "$PO_FILES" ]; then
then
# Use updated .pot file to update translations # Use updated .pot file to update translations
python setup.py update_catalog --no-fuzzy-matching --ignore-obsolete=true python setup.py update_catalog --no-fuzzy-matching --ignore-obsolete=true
fi fi

View File

@@ -33,11 +33,9 @@ setup_manuals "$PROJECT"
tx pull -a -f tx pull -a -f
# Add imported upstream translations to git # Add imported upstream translations to git
for FILE in ${DocFolder}/* for FILE in ${DocFolder}/*; do
do
DOCNAME=${FILE#${DocFolder}/} DOCNAME=${FILE#${DocFolder}/}
if [ -d ${DocFolder}/${DOCNAME}/locale ] if [ -d ${DocFolder}/${DOCNAME}/locale ] ; then
then
git add ${DocFolder}/${DOCNAME}/locale/* git add ${DocFolder}/${DOCNAME}/locale/*
fi fi
done done

View File

@@ -18,13 +18,12 @@ rm -f dist/*.tar.gz
tox -evenv python setup.py sdist tox -evenv python setup.py sdist
FILES=dist/*.tar.gz FILES=dist/*.tar.gz
for f in $FILES for f in $FILES; do
do echo "SHA1sum for $f:"
echo "SHA1sum for $f:" sha1sum $f | awk '{print $1}' > $f.sha1
sha1sum $f | awk '{print $1}' > $f.sha1 cat $f.sha1
cat $f.sha1
echo "MD5sum for $f:" echo "MD5sum for $f:"
md5sum $f | awk '{print $1}' > $f.md5 md5sum $f | awk '{print $1}' > $f.md5
cat $f.md5 cat $f.md5
done done

View File

@@ -13,12 +13,11 @@
venv=$1 venv=$1
if [[ -z "$venv" ]] if [[ -z "$venv" ]]; then
then echo "Usage: $?"
echo "Usage: $?" echo
echo echo "VENV: The tox environment to run (eg 'python27')"
echo "VENV: The tox environment to run (eg 'python27')" exit 1
exit 1
fi fi
cat /etc/image-hostname.txt cat /etc/image-hostname.txt
@@ -33,8 +32,7 @@ result=$?
sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post
sudoresult=$? sudoresult=$?
if [ $sudoresult -ne "0" ] if [ $sudoresult -ne "0" ]; then
then
echo echo
echo "This test has failed because it attempted to execute commands" echo "This test has failed because it attempted to execute commands"
echo "with sudo. See above for the exact commands used." echo "with sudo. See above for the exact commands used."
@@ -45,8 +43,7 @@ fi
/usr/local/jenkins/slave_scripts/jenkins-oom-grep.sh post /usr/local/jenkins/slave_scripts/jenkins-oom-grep.sh post
oomresult=$? oomresult=$?
if [ $oomresult -ne "0" ] if [ $oomresult -ne "0" ]; then
then
echo echo
echo "This test has failed because it attempted to exceed configured" echo "This test has failed because it attempted to exceed configured"
echo "memory limits and was killed prior to completion. See above" echo "memory limits and was killed prior to completion. See above"

View File

@@ -69,8 +69,7 @@ fi
sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post
sudoresult=$? sudoresult=$?
if [ $sudoresult -ne "0" ] if [ $sudoresult -ne "0" ]; then
then
echo echo
echo "This test has failed because it attempted to execute commands" echo "This test has failed because it attempted to execute commands"
echo "with sudo. See above for the exact commands used." echo "with sudo. See above for the exact commands used."
@@ -81,8 +80,7 @@ fi
/usr/local/jenkins/slave_scripts/jenkins-oom-grep.sh post /usr/local/jenkins/slave_scripts/jenkins-oom-grep.sh post
oomresult=$? oomresult=$?
if [ $oomresult -ne "0" ] if [ $oomresult -ne "0" ]; then
then
echo echo
echo "This test has failed because it attempted to exceed configured" echo "This test has failed because it attempted to exceed configured"
echo "memory limits and was killed prior to completion. See above" echo "memory limits and was killed prior to completion. See above"
@@ -92,11 +90,9 @@ then
fi fi
htmlreport=$(find . -name $NOSE_HTML_OUT_FILE) htmlreport=$(find . -name $NOSE_HTML_OUT_FILE)
if [ -f "$htmlreport" ] if [ -f "$htmlreport" ]; then
then
passcount=$(grep -c 'tr class=.passClass' $htmlreport) passcount=$(grep -c 'tr class=.passClass' $htmlreport)
if [ $passcount -eq "0" ] if [ $passcount -eq "0" ]; then
then
echo echo
echo "Zero tests passed, which probably means there was an error" echo "Zero tests passed, which probably means there was an error"
echo "parsing one of the python files, or that some other failure" echo "parsing one of the python files, or that some other failure"

View File

@@ -19,11 +19,10 @@ tox -evenv pip install wheel
tox -evenv python setup.py bdist_wheel tox -evenv python setup.py bdist_wheel
FILES=dist/*.whl FILES=dist/*.whl
for f in $FILES for f in $FILES; do
do echo -n "SHA1sum for $f: "
echo -n "SHA1sum for $f: " sha1sum $f | awk '{print $1}' | tee $f.sha1
sha1sum $f | awk '{print $1}' | tee $f.sha1
echo -n "MD5sum for $f: " echo -n "MD5sum for $f: "
md5sum $f | awk '{print $1}' | tee $f.md5 md5sum $f | awk '{print $1}' | tee $f.md5
done done

View File

@@ -16,8 +16,7 @@
# The script is to push the updated English po to Transifex. # The script is to push the updated English po to Transifex.
if [ ! `echo $ZUUL_REFNAME | grep master` ] if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
then
exit 0 exit 0
fi fi
@@ -34,8 +33,7 @@ python setup.py extract_messages
# Add all changed files to git # Add all changed files to git
git add openstack_auth/locale/* git add openstack_auth/locale/*
if [ ! `git diff-index --quiet HEAD --` ] if [ ! `git diff-index --quiet HEAD --` ]; then
then
# Push .pot changes to transifex # Push .pot changes to transifex
tx --debug --traceback push -s tx --debug --traceback push -s
fi fi

View File

@@ -18,8 +18,7 @@
PROJECT="horizon" PROJECT="horizon"
if [ ! `echo $ZUUL_REFNAME | grep master` ] if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
then
exit 0 exit 0
fi fi
@@ -38,8 +37,7 @@ setup_horizon
git add ${PROJECT}/locale/en/LC_MESSAGES/* git add ${PROJECT}/locale/en/LC_MESSAGES/*
git add openstack_dashboard/locale/en/LC_MESSAGES/* git add openstack_dashboard/locale/en/LC_MESSAGES/*
if [ `git diff --cached | egrep -v "(POT-Creation-Date|^[\+\-]#|^\+{3}|^\-{3})" | egrep -c "^[\-\+]"` -gt 0 ] if [ `git diff --cached | egrep -v "(POT-Creation-Date|^[\+\-]#|^\+{3}|^\-{3})" | egrep -c "^[\-\+]"` -gt 0 ]; then
then
# Push source file changes to transifex # Push source file changes to transifex
tx --debug --traceback push -s tx --debug --traceback push -s
fi fi

View File

@@ -14,8 +14,7 @@
PROJECT=$1 PROJECT=$1
if [ ! `echo $ZUUL_REFNAME | grep master` ] if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
then
exit 0 exit 0
fi fi
@@ -33,8 +32,7 @@ extract_messages_log "$PROJECT"
# Add all changed files to git # Add all changed files to git
git add $PROJECT/locale/* git add $PROJECT/locale/*
if [ ! `git diff-index --quiet HEAD --` ] if [ ! `git diff-index --quiet HEAD --` ]; then
then
# Push .pot changes to transifex # Push .pot changes to transifex
# Transifex project name does not include "." # Transifex project name does not include "."

View File

@@ -18,8 +18,7 @@
PROJECT=$1 PROJECT=$1
if [ ! `echo $ZUUL_REFNAME | grep master` ] if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
then
exit 0 exit 0
fi fi
@@ -32,8 +31,7 @@ setup_translation
setup_manuals "$PROJECT" setup_manuals "$PROJECT"
if [ ! `git diff --cached --quiet HEAD --` ] if [ ! `git diff --cached --quiet HEAD --` ]; then
then
# Push .pot changes to transifex # Push .pot changes to transifex
tx --debug --traceback push -s tx --debug --traceback push -s
fi fi

View File

@@ -12,9 +12,10 @@ echo "Jenkins: Waiting for puppet to complete on all nodes"
DONE=0 DONE=0
while [ $DONE != 1 ]; do while [ $DONE != 1 ]; do
DONE=1 DONE=1
for hostname in $HOSTS for hostname in $HOSTS; do
do if !(grep "$hostname $FINISH_RE" $LOGFILE >/dev/null); then
if !(grep "$hostname $FINISH_RE" $LOGFILE >/dev/null); then DONE=0; fi DONE=0
fi
done done
sleep 5 sleep 5
done done

View File

@@ -88,7 +88,7 @@ DOMZERO_USER=domzero
# directory to ramdisk. # directory to ramdisk.
XSINST_DIRECTORY="/xsinst" XSINST_DIRECTORY="/xsinst"
function main() { function main {
case "$(get_state)" in case "$(get_state)" in
"START") "START")
dump_disk_config dump_disk_config
@@ -146,7 +146,7 @@ function main() {
esac esac
} }
function set_state() { function set_state {
local state local state
state="$1" state="$1"
@@ -154,7 +154,7 @@ function set_state() {
echo "$state" > $STATE_FILE echo "$state" > $STATE_FILE
} }
function get_state() { function get_state {
if [ -e "$STATE_FILE" ]; then if [ -e "$STATE_FILE" ]; then
cat $STATE_FILE cat $STATE_FILE
else else
@@ -162,7 +162,7 @@ function get_state() {
fi fi
} }
function create_resizing_initramfs_config() { function create_resizing_initramfs_config {
cp "$THIS_DIR/xenserver_helper_initramfs_hook.sh" \ cp "$THIS_DIR/xenserver_helper_initramfs_hook.sh" \
/usr/share/initramfs-tools/hooks/resize /usr/share/initramfs-tools/hooks/resize
chmod +x /usr/share/initramfs-tools/hooks/resize chmod +x /usr/share/initramfs-tools/hooks/resize
@@ -172,12 +172,12 @@ function create_resizing_initramfs_config() {
chmod +x /usr/share/initramfs-tools/scripts/local-premount/resize chmod +x /usr/share/initramfs-tools/scripts/local-premount/resize
} }
function delete_resizing_initramfs_config() { function delete_resizing_initramfs_config {
rm -f /usr/share/initramfs-tools/hooks/resize rm -f /usr/share/initramfs-tools/hooks/resize
rm -f /usr/share/initramfs-tools/scripts/local-premount/resize rm -f /usr/share/initramfs-tools/scripts/local-premount/resize
} }
function run_this_script_on_each_boot() { function run_this_script_on_each_boot {
cat > /etc/init/xenserver.conf << EOF cat > /etc/init/xenserver.conf << EOF
start on stopped rc RUNLEVEL=[2345] start on stopped rc RUNLEVEL=[2345]
@@ -189,13 +189,13 @@ end script
EOF EOF
} }
function create_done_file_on_appliance() { function create_done_file_on_appliance {
while ! echo "sudo touch $FILE_TO_TOUCH_ON_COMPLETION" | bash_on_appliance; do while ! echo "sudo touch $FILE_TO_TOUCH_ON_COMPLETION" | bash_on_appliance; do
sleep 1 sleep 1
done done
} }
function download_xenserver_files() { function download_xenserver_files {
local tgt local tgt
tgt="$1" tgt="$1"
@@ -203,7 +203,7 @@ function download_xenserver_files() {
wget -qO "$tgt" "$XENSERVER_ISO_URL" wget -qO "$tgt" "$XENSERVER_ISO_URL"
} }
function download_appliance() { function download_appliance {
local appliance_url local appliance_url
appliance_url="$1" appliance_url="$1"
@@ -211,7 +211,7 @@ function download_appliance() {
wget -qO /root/staging_vm.xva "$appliance_url" wget -qO /root/staging_vm.xva "$appliance_url"
} }
function print_answerfile() { function print_answerfile {
local repository local repository
local postinst local postinst
local xenserver_pass local xenserver_pass
@@ -238,7 +238,7 @@ function print_answerfile() {
EOF EOF
} }
function print_postinst_file() { function print_postinst_file {
local rclocal local rclocal
rclocal="$1" rclocal="$1"
@@ -252,7 +252,7 @@ cp /tmp/ramdisk/authorized_keys \$1/root/.ssh/
EOF EOF
} }
function print_rclocal() { function print_rclocal {
cat << EOF cat << EOF
# This is the contents of the rc.local file on XenServer # This is the contents of the rc.local file on XenServer
mkdir -p /mnt/ubuntu mkdir -p /mnt/ubuntu
@@ -263,7 +263,7 @@ mkdir -p $(dirname $INSTALL_DIR)
EOF EOF
} }
function create_ramdisk_contents() { function create_ramdisk_contents {
local isofile local isofile
local target_dir local target_dir
@@ -280,7 +280,7 @@ function create_ramdisk_contents() {
"$XENSERVER_PASSWORD" > "$target_dir/answerfile.xml" "$XENSERVER_PASSWORD" > "$target_dir/answerfile.xml"
} }
function extract_xs_installer() { function extract_xs_installer {
local isofile local isofile
local targetpath local targetpath
@@ -300,7 +300,7 @@ function extract_xs_installer() {
umount $mountdir umount $mountdir
} }
function generate_xs_installer_grub_config() { function generate_xs_installer_grub_config {
local bootfiles local bootfiles
local answerfile local answerfile
@@ -319,7 +319,7 @@ EOF
chmod +x /etc/grub.d/45_xs-install chmod +x /etc/grub.d/45_xs-install
} }
function configure_grub() { function configure_grub {
sed -ie 's/^GRUB_HIDDEN_TIMEOUT/#GRUB_HIDDEN_TIMEOUT/g' /etc/default/grub sed -ie 's/^GRUB_HIDDEN_TIMEOUT/#GRUB_HIDDEN_TIMEOUT/g' /etc/default/grub
sed -ie 's/^GRUB_HIDDEN_TIMEOUT_QUIET/#GRUB_HIDDEN_TIMEOUT_QUIET/g' /etc/default/grub sed -ie 's/^GRUB_HIDDEN_TIMEOUT_QUIET/#GRUB_HIDDEN_TIMEOUT_QUIET/g' /etc/default/grub
# sed -ie 's/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=-1/g' /etc/default/grub # sed -ie 's/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=-1/g' /etc/default/grub
@@ -327,11 +327,11 @@ function configure_grub() {
sed -ie 's/GRUB_DEFAULT=0/GRUB_DEFAULT=saved/g' /etc/default/grub sed -ie 's/GRUB_DEFAULT=0/GRUB_DEFAULT=saved/g' /etc/default/grub
} }
function set_xenserver_installer_as_nextboot() { function set_xenserver_installer_as_nextboot {
grub-set-default "XenServer installer" grub-set-default "XenServer installer"
} }
function store_cloud_settings() { function store_cloud_settings {
local targetpath local targetpath
targetpath="$1" targetpath="$1"
@@ -345,7 +345,7 @@ NAMESERVERS=$(cat /etc/resolv.conf | grep nameserver | cut -d " " -f 2 | sort |
EOF EOF
} }
function store_authorized_keys() { function store_authorized_keys {
local targetpath local targetpath
targetpath="$1" targetpath="$1"
@@ -353,13 +353,13 @@ function store_authorized_keys() {
cp /root/.ssh/authorized_keys $1 cp /root/.ssh/authorized_keys $1
} }
function wait_for_xapi() { function wait_for_xapi {
while ! [ -e /var/run/xapi_init_complete.cookie ]; do while ! [ -e /var/run/xapi_init_complete.cookie ]; do
sleep 1 sleep 1
done done
} }
function forget_networking() { function forget_networking {
xe host-management-disable xe host-management-disable
IFS=, IFS=,
for vlan in $(xe vlan-list --minimal); do for vlan in $(xe vlan-list --minimal); do
@@ -374,7 +374,7 @@ function forget_networking() {
unset IFS unset IFS
} }
function add_boot_config_for_ubuntu() { function add_boot_config_for_ubuntu {
local ubuntu_bootfiles local ubuntu_bootfiles
local bootfiles local bootfiles
@@ -398,7 +398,7 @@ label ubuntu
UBUNTU UBUNTU
} }
function start_ubuntu_on_next_boot() { function start_ubuntu_on_next_boot {
local bootfiles local bootfiles
bootfiles="$1" bootfiles="$1"
@@ -406,7 +406,7 @@ function start_ubuntu_on_next_boot() {
sed -ie 's,default xe-serial,default ubuntu,g' $bootfiles/extlinux.conf sed -ie 's,default xe-serial,default ubuntu,g' $bootfiles/extlinux.conf
} }
function start_xenserver_on_next_boot() { function start_xenserver_on_next_boot {
local bootfiles local bootfiles
bootfiles="$1" bootfiles="$1"
@@ -414,7 +414,7 @@ function start_xenserver_on_next_boot() {
sed -ie 's,default ubuntu,default xe-serial,g' $bootfiles/extlinux.conf sed -ie 's,default ubuntu,default xe-serial,g' $bootfiles/extlinux.conf
} }
function mount_dom0_fs() { function mount_dom0_fs {
local target local target
target="$1" target="$1"
@@ -423,13 +423,13 @@ function mount_dom0_fs() {
mount /dev/xvda2 $target mount /dev/xvda2 $target
} }
function wait_for_networking() { function wait_for_networking {
while ! ping -c 1 xenserver.org > /dev/null 2>&1; do while ! ping -c 1 xenserver.org > /dev/null 2>&1; do
sleep 1 sleep 1
done done
} }
function bash_on_appliance() { function bash_on_appliance {
local vm_ip local vm_ip
local vm local vm
@@ -452,7 +452,7 @@ function bash_on_appliance() {
"$DOMZERO_USER@$vm_ip" bash -e -u -s -x -- "$@" "$DOMZERO_USER@$vm_ip" bash -e -u -s -x -- "$@"
} }
function configure_networking() { function configure_networking {
local network_settings local network_settings
network_settings="$1" network_settings="$1"
@@ -576,7 +576,7 @@ EOF
cat $tmpdomzerokey >> /root/.ssh/authorized_keys cat $tmpdomzerokey >> /root/.ssh/authorized_keys
} }
function transfer_settings_to_appliance() { function transfer_settings_to_appliance {
local network_settings local network_settings
network_settings="$1" network_settings="$1"
@@ -585,7 +585,7 @@ function transfer_settings_to_appliance() {
/opt/xensource/libexec/interface-reconfigure rewrite /opt/xensource/libexec/interface-reconfigure rewrite
} }
function dump_disk_config() { function dump_disk_config {
echo "DUMPING Primary disk's configuration" echo "DUMPING Primary disk's configuration"
sfdisk -d /dev/xvda sfdisk -d /dev/xvda
} }

View File

@@ -25,6 +25,6 @@ done
# install pip using get-pip # install pip using get-pip
PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
if [ ! -f get-pip.py ] ; then if [ ! -f get-pip.py ] ; then
curl -O $PIP_GET_PIP_URL || wget $PIP_GET_PIP_URL curl -O $PIP_GET_PIP_URL || wget $PIP_GET_PIP_URL
fi fi
sudo python get-pip.py sudo python get-pip.py

View File

@@ -21,12 +21,12 @@ mkdir -p ~/cache/pip
if [ -f /usr/bin/yum ]; then if [ -f /usr/bin/yum ]; then
sudo yum -y install python-devel make automake gcc gcc-c++ \ sudo yum -y install python-devel make automake gcc gcc-c++ \
kernel-devel redhat-lsb-core kernel-devel redhat-lsb-core
elif [ -f /usr/bin/apt-get ]; then elif [ -f /usr/bin/apt-get ]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get \ sudo DEBIAN_FRONTEND=noninteractive apt-get \
--option "Dpkg::Options::=--force-confold" \ --option "Dpkg::Options::=--force-confold" \
--assume-yes install build-essential python-dev \ --assume-yes install build-essential python-dev \
python-software-properties linux-headers-virtual linux-headers-`uname -r` python-software-properties linux-headers-virtual linux-headers-`uname -r`
else else
echo "Unsupported distro." echo "Unsupported distro."
exit 1 exit 1

View File

@@ -28,8 +28,7 @@ GIT_BASE=${GIT_BASE:-git://git.openstack.org}
export PUPPET_VERSION=${PUPPET_VERSION:-'2'} export PUPPET_VERSION=${PUPPET_VERSION:-'2'}
sudo hostname $HOSTNAME sudo hostname $HOSTNAME
if [ -n "$HOSTNAME" ] && ! grep -q $HOSTNAME /etc/hosts if [ -n "$HOSTNAME" ] && ! grep -q $HOSTNAME /etc/hosts ; then
then
echo "127.0.1.1 $HOSTNAME" | sudo tee -a /etc/hosts echo "127.0.1.1 $HOSTNAME" | sudo tee -a /etc/hosts
fi fi

View File

@@ -20,7 +20,7 @@
# Enable precise-backports so we can install jq # Enable precise-backports so we can install jq
if [ -f /usr/bin/apt-get ]; then if [ -f /usr/bin/apt-get ]; then
sudo sed -i -e 's/# \(deb .*precise-backports main \)/\1/g' \ sudo sed -i -e 's/# \(deb .*precise-backports main \)/\1/g' \
/etc/apt/sources.list /etc/apt/sources.list
sudo apt-get update sudo apt-get update
fi fi
@@ -37,7 +37,7 @@ sudo pip install gear os-apply-config
# tests. # tests.
if [ -d /etc/sysconfig/network-scripts ]; then if [ -d /etc/sysconfig/network-scripts ]; then
sudo dd of=/etc/sysconfig/network-scripts/ifcfg-eth1 << EOF sudo dd of=/etc/sysconfig/network-scripts/ifcfg-eth1 << EOF
DEVICE="eth1" DEVICE="eth1"
BOOTPROTO="dhcp" BOOTPROTO="dhcp"
ONBOOT="yes" ONBOOT="yes"
@@ -46,13 +46,13 @@ PEERDNS="no"
EOF EOF
elif [ -f /etc/network/interfaces ]; then elif [ -f /etc/network/interfaces ]; then
sudo dd of=/etc/network/interfaces oflag=append conv=notrunc << EOF sudo dd of=/etc/network/interfaces oflag=append conv=notrunc << EOF
auto eth1 auto eth1
iface eth1 inet dhcp iface eth1 inet dhcp
EOF EOF
# Workaround bug 1270646 for actual slaves # Workaround bug 1270646 for actual slaves
sudo dd of=/etc/network/interfaces.d/eth0.cfg oflag=append conv=notrunc << EOF sudo dd of=/etc/network/interfaces.d/eth0.cfg oflag=append conv=notrunc << EOF
post-up ip link set mtu 1458 dev eth0 post-up ip link set mtu 1458 dev eth0
EOF EOF

View File

@@ -4,7 +4,7 @@ set -e
PREREQ="" PREREQ=""
prereqs () { function prereqs {
echo "${PREREQ}" echo "${PREREQ}"
} }

View File

@@ -5,8 +5,7 @@ set -ex
PREREQ="" PREREQ=""
# Output pre-requisites # Output pre-requisites
prereqs() function prereqs {
{
echo "$PREREQ" echo "$PREREQ"
} }

4
tools/run-bashate.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
ROOT=$(readlink -fn $(dirname $0)/.. )
find $ROOT -not -wholename \*.tox/\* -and \( -name \*.sh -or -name \*rc -or -name functions\* \) -print0 | xargs -0 bashate -v

View File

@@ -48,4 +48,4 @@ commands =
{toxinidir}/tools/run-layout.sh openstack-infra config {toxinidir}/tools/run-layout.sh openstack-infra config
[testenv:bashate] [testenv:bashate]
commands = bashate -v commands = {toxinidir}/tools/run-bashate.sh

View File

@@ -780,8 +780,6 @@ jobs:
voting: false voting: false
- name: gate-config-bashate - name: gate-config-bashate
voting: false voting: false
- name: gate-project-config-bashate
voting: false
# TODO(rpodolyaka): make voting when the jobs pass on all SA versions # TODO(rpodolyaka): make voting when the jobs pass on all SA versions
- name: gate-oslo.db-tox-sqla_08 - name: gate-oslo.db-tox-sqla_08
voting: false voting: false