Commits

dirkbaechle committed 8e42d86

- corrected LC_ALL setting for RPM packaging
- now skipping several Docbook tests, when required stylesheets aren't installed

Comments (0)

Files changed (8)

src/engine/SCons/Tool/rpm.py

                                        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 ):
         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')

test/Docbook/basedir/htmlchunked/htmlchunked.py

 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:

test/Docbook/basedir/htmlhelp/htmlhelp.py

 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:

test/Docbook/basedir/slideshtml/slideshtml.py

 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:

test/Docbook/basic/slideshtml/slideshtml.py

 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:

test/Docbook/rootname/htmlchunked/htmlchunked.py

 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:

test/Docbook/rootname/htmlhelp/htmlhelp.py

 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:

test/Docbook/rootname/slideshtml/slideshtml.py

 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: