From 703ba43b17517810162d91b109b54fc76868eee6 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Sun, 3 Nov 2013 19:17:58 +0100 Subject: - corrected LC_ALL setting for RPM packaging - now skipping several Docbook tests, when required stylesheets aren't installed --- src/engine/SCons/Tool/rpm.py | 4 ++-- test/Docbook/basedir/htmlchunked/htmlchunked.py | 6 ++++++ test/Docbook/basedir/htmlhelp/htmlhelp.py | 6 ++++++ test/Docbook/basedir/slideshtml/slideshtml.py | 7 +++++++ test/Docbook/basic/slideshtml/slideshtml.py | 7 +++++++ test/Docbook/rootname/htmlchunked/htmlchunked.py | 6 ++++++ test/Docbook/rootname/htmlhelp/htmlhelp.py | 6 ++++++ test/Docbook/rootname/slideshtml/slideshtml.py | 7 +++++++ 8 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Tool/rpm.py b/src/engine/SCons/Tool/rpm.py index 26d2109..1f6eafe 100644 --- a/src/engine/SCons/Tool/rpm.py +++ b/src/engine/SCons/Tool/rpm.py @@ -79,7 +79,7 @@ def build_rpm(target, source, env): errstr=output, filename=str(target[0]) ) else: - # XXX: assume that LC_ALL=c is set while running rpmbuild + # XXX: assume that LC_ALL=C is set while running rpmbuild output_files = re.compile( 'Wrote: (.*)' ).findall( output ) for output, input in zip( output_files, target ): @@ -117,7 +117,7 @@ def generate(env): bld = RpmBuilder env['BUILDERS']['Rpm'] = bld - env.SetDefault(RPM = 'LC_ALL=c rpmbuild') + env.SetDefault(RPM = 'LC_ALL=C rpmbuild') env.SetDefault(RPMFLAGS = SCons.Util.CLVar('-ta')) env.SetDefault(RPMCOM = rpmAction) env.SetDefault(RPMSUFFIX = '.rpm') diff --git a/test/Docbook/basedir/htmlchunked/htmlchunked.py b/test/Docbook/basedir/htmlchunked/htmlchunked.py index c581701..cf5f3d1 100644 --- a/test/Docbook/basedir/htmlchunked/htmlchunked.py +++ b/test/Docbook/basedir/htmlchunked/htmlchunked.py @@ -26,10 +26,16 @@ Test the base_dir argument for the chunked HTML builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl')): + test.skip_test('Wrong OS or no stylesheets installed, skipping test.\n') + try: import libxml2 except: diff --git a/test/Docbook/basedir/htmlhelp/htmlhelp.py b/test/Docbook/basedir/htmlhelp/htmlhelp.py index 736f732..22bbd72 100644 --- a/test/Docbook/basedir/htmlhelp/htmlhelp.py +++ b/test/Docbook/basedir/htmlhelp/htmlhelp.py @@ -26,10 +26,16 @@ Test the base_dir argument for the HTMLHELP builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl')): + test.skip_test('Wrong OS or no stylesheets installed, skipping test.\n') + try: import libxml2 except: diff --git a/test/Docbook/basedir/slideshtml/slideshtml.py b/test/Docbook/basedir/slideshtml/slideshtml.py index 505d36d..a2375e4 100644 --- a/test/Docbook/basedir/slideshtml/slideshtml.py +++ b/test/Docbook/basedir/slideshtml/slideshtml.py @@ -26,10 +26,17 @@ Test the base_dir argument for the Slides HTML builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl/slides') and + os.path.isdir('/usr/share/xml/docbook/custom/slides/3.3.1')): + test.skip_test('Wrong OS or no "slides" stylesheets installed, skipping test.\n') + try: import libxml2 except: diff --git a/test/Docbook/basic/slideshtml/slideshtml.py b/test/Docbook/basic/slideshtml/slideshtml.py index d4636d4..37c2be0 100644 --- a/test/Docbook/basic/slideshtml/slideshtml.py +++ b/test/Docbook/basic/slideshtml/slideshtml.py @@ -26,10 +26,17 @@ Test the Slides HTML builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl/slides') and + os.path.isdir('/usr/share/xml/docbook/custom/slides/3.3.1')): + test.skip_test('Wrong OS or no "slides" stylesheets installed, skipping test.\n') + try: import libxml2 except: diff --git a/test/Docbook/rootname/htmlchunked/htmlchunked.py b/test/Docbook/rootname/htmlchunked/htmlchunked.py index 2489019..8ab91d2 100644 --- a/test/Docbook/rootname/htmlchunked/htmlchunked.py +++ b/test/Docbook/rootname/htmlchunked/htmlchunked.py @@ -26,10 +26,16 @@ Test the root.name argument for the chunked HTML builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl')): + test.skip_test('Wrong OS or no stylesheets installed, skipping test.\n') + try: import libxml2 except: diff --git a/test/Docbook/rootname/htmlhelp/htmlhelp.py b/test/Docbook/rootname/htmlhelp/htmlhelp.py index 84be5d9..ee37e1a 100644 --- a/test/Docbook/rootname/htmlhelp/htmlhelp.py +++ b/test/Docbook/rootname/htmlhelp/htmlhelp.py @@ -26,10 +26,16 @@ Test the root.name argument for the HTMLHELP builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl')): + test.skip_test('Wrong OS or no stylesheets installed, skipping test.\n') + try: import libxml2 except: diff --git a/test/Docbook/rootname/slideshtml/slideshtml.py b/test/Docbook/rootname/slideshtml/slideshtml.py index c316ada..4d55035 100644 --- a/test/Docbook/rootname/slideshtml/slideshtml.py +++ b/test/Docbook/rootname/slideshtml/slideshtml.py @@ -26,10 +26,17 @@ Test the root.name argument for the Slides HTML builder. """ +import os +import sys import TestSCons test = TestSCons.TestSCons() +if not (sys.platform.startswith('linux') and + os.path.isdir('/usr/share/xml/docbook/stylesheet/docbook-xsl/slides') and + os.path.isdir('/usr/share/xml/docbook/custom/slides/3.3.1')): + test.skip_test('Wrong OS or no "slides" stylesheets installed, skipping test.\n') + try: import libxml2 except: -- cgit v0.12