Create checklang tox.ini target
Create target to test that localized manuals are actually building. Change-Id: Ia9ad298c4e9ee24f774e986d46c3c370d6046376
This commit is contained in:
parent
ab7ad80358
commit
6bb3b8f57a
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
function setup_directory {
|
||||
SET_LANG=$1
|
||||
shift
|
||||
for BOOK_DIR in "$@" ; do
|
||||
openstack-generate-docbook -l $SET_LANG -b $BOOK_DIR
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
function test_manuals {
|
||||
SET_LANG=$1
|
||||
shift
|
||||
for BOOK in "$@" ; do
|
||||
echo "Building $BOOK for language $SET_LANG..."
|
||||
setup_directory $SET_LANG $BOOK
|
||||
openstack-doc-test --check-build -l $SET_LANG --only-book $BOOK
|
||||
RET=$?
|
||||
if [ "$RET" -eq "0" ] ; then
|
||||
echo "... succeeded"
|
||||
else
|
||||
echo "... failed"
|
||||
BUILD_FAIL=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function test_all {
|
||||
test_manuals 'ja' 'openstack-ops'
|
||||
}
|
||||
|
||||
|
||||
BUILD_FAIL=0
|
||||
test_all
|
||||
|
||||
exit $BUILD_FAIL
|
8
tox.ini
8
tox.ini
|
@ -33,6 +33,14 @@ commands = openstack-doc-test --check-build {posargs}
|
|||
# over.
|
||||
commands = openstack-doc-test --check-build --nocreate-index --force
|
||||
|
||||
[testenv:checklang]
|
||||
# Generatedocbook needs xml2po which cannot be installed
|
||||
# in the venv. Since it's installed in the system, let's
|
||||
# use sitepackages.
|
||||
sitepackages=True
|
||||
whitelist_externals = bash
|
||||
commands = bash tools/test-languages.sh
|
||||
|
||||
[testenv:buildlang]
|
||||
# Run as "tox -e buildlang -- $LANG"
|
||||
# Generatedocbook needs xml2po which cannot be installed
|
||||
|
|
Loading…
Reference in New Issue