]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Check that all po/pot files are valid
authorAndreas Jaeger <aj@suse.de>
Mon, 31 Mar 2014 18:37:27 +0000 (20:37 +0200)
committerAndreas Jaeger <aj@suse.de>
Thu, 3 Apr 2014 18:06:24 +0000 (20:06 +0200)
Perform minimal checks on po and pot files so that no broken files can
get imported.

Change-Id: I5dd0ca872fa25f8ef9557f039904090c4a672ff3
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Related-Bug: #1299349

tox.ini

diff --git a/tox.ini b/tox.ini
index 2f306065eb8ff7b60cb24923f31c7b2de2931dc1..2fb1d0cdbdc001a167a4ae7eac26fe26dab87aeb 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -13,6 +13,7 @@ deps = -r{toxinidir}/requirements.txt
 commands =
   python setup.py testr --slowest --testr-args='--concurrency 1 {posargs}'
   {toxinidir}/tools/config/check_uptodate.sh
+whitelist_externals = bash
 
 [tox:jenkins]
 downloadcache = ~/cache/pip
@@ -21,6 +22,8 @@ downloadcache = ~/cache/pip
 commands =
   flake8 {posargs} . cinder/common
   flake8 --filename=cinder* bin
+  # Check that .po and .pot files are valid:
+  bash -c "find cinder -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
 
 [testenv:pylint]
 setenv = VIRTUAL_ENV={envdir}