diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/Testsrc/test_doc.py | 39 | ||||
-rwxr-xr-x | testsuite/install.sh | 5 |
2 files changed, 42 insertions, 2 deletions
diff --git a/testsuite/Testsrc/test_doc.py b/testsuite/Testsrc/test_doc.py new file mode 100644 index 000000000..93c8d1bb4 --- /dev/null +++ b/testsuite/Testsrc/test_doc.py @@ -0,0 +1,39 @@ +import os +import sys + +# add all parent testsuite directories to sys.path to allow (most) +# relative imports in python 2.4 +_path = os.path.dirname(__file__) +while _path != '/': + if os.path.basename(_path).lower().startswith("test"): + sys.path.append(_path) + if os.path.basename(_path) == "testsuite": + break + _path = os.path.dirname(_path) +from common import * + + +try: + from sphinx.application import Sphinx + HAS_SPHINX = True +except ImportError: + HAS_SPHINX = False + + +TEST_SPHINX = bool(os.environ.get('TEST_SPHINX', 'yes') != 'no') + + +class DocTest(Bcfg2TestCase): + top = os.path.join(os.path.dirname(__file__), '..', '..') + source_dir = os.path.join(top, 'doc/') + doctree_dir = os.path.join(top, 'build', 'doctree') + + @skipUnless(HAS_SPHINX, 'Sphinx not found') + @skipUnless(TEST_SPHINX, 'Documentation testing disabled') + def test_html_documentation(self): + output_dir = os.path.join(self.top, 'build', 'html') + + app = Sphinx(self.source_dir, self.source_dir, output_dir, + self.doctree_dir, buildername='html', + warningiserror=True) + app.build(force_all=True) diff --git a/testsuite/install.sh b/testsuite/install.sh index eba870465..d8e5079be 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -14,9 +14,10 @@ if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then fi if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - sudo apt-get install -y yum libaugeas0 augeas-lenses libacl1-dev libssl-dev + sudo apt-get install -y yum libaugeas0 augeas-lenses libacl1-dev libssl-dev \ + python-gamin python-selinux - pip install PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy + pip install PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy easy_install https://fedorahosted.org/released/python-augeas/python-augeas-0.4.1.tar.gz if [[ ${PYVER:0:1} == "2" ]]; then |