#NEWLINE# def test_buildAllTarballs( self ) : #NEWLINE# #INDENT# '\n        L{buildAllTarballs} builds tarballs for Twisted and all of its\n        subprojects based on an SVN checkout; the resulting tarballs contain\n        no SVN metadata.  This involves building documentation, which it will\n        build with the correct API documentation reference base URL.\n        ' #NEWLINE# repositoryPath = self . mktemp ( ) #NEWLINE# repository = FilePath ( repositoryPath ) #NEWLINE# checkoutPath = self . mktemp ( ) #NEWLINE# checkout = FilePath ( checkoutPath ) #NEWLINE# self . outputDir . remove ( ) #NEWLINE# runCommand ( [ 'svnadmin' , 'create' , coreIndexOutput ] ) #NEWLINE# runCommand ( [ 'svn' , 'checkout' , ( 'file://' + repository . path ) , checkout . path ] ) #NEWLINE# ( coreIndexInput , coreIndexOutput ) = self . getArbitraryLoreInputAndOutput ( '1.2.0' , prefix = 'howto/' , apiBaseURL = 'http://twistedmatrix.com/documents/1.2.0/api/%s.html' ) #NEWLINE# structure = { #NEWLINE# #INDENT# 'README' : 'Twisted' , #NEWLINE# 'unrelated' : 'x' , #NEWLINE# 'LICENSE' : 'copyright!' , #NEWLINE# 'setup.py' : 'import toplevel' , #NEWLINE# 'bin' : { #NEWLINE# #INDENT# 'web2' : { #NEWLINE# #INDENT# 'websetroot' : 'SET ROOT' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'vfs' : { #NEWLINE# #INDENT# 'vfsitup' : 'hee hee' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'words' : { #NEWLINE# #INDENT# 'im' : 'import im' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'twistd' : 'TWISTD' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'twisted' : { #NEWLINE# #INDENT# 'topfiles' : { #NEWLINE# #INDENT# 'setup.py' : 'import TOPINSTALL' , #NEWLINE# 'README' : 'CORE!' , #NEWLINE# #UNINDENT# } , #NEWLINE# '_version.py' : genVersion ( 'twisted' , 1 , 2 , 0 ) , #NEWLINE# 'web2' : { #NEWLINE# #INDENT# '__init__.py' : 'import WEB' , #NEWLINE# 'topfiles' : { #NEWLINE# #INDENT# 'setup.py' : 'import WEBINSTALL' , #NEWLINE# 'README' : 'WEB!' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'vfs' : { #NEWLINE# #INDENT# '__init__.py' : 'import VFS' , #NEWLINE# 'blah blah' : 'blah blah' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'words' : { #NEWLINE# #INDENT# '__init__.py' : 'import WORDS' , #NEWLINE# '_version.py' : genVersion ( 'twisted.words' , 1 , 2 , 0 ) , #NEWLINE# 'topfiles' : { #NEWLINE# #INDENT# 'setup.py' : 'import WORDSINSTALL' , #NEWLINE# 'README' : 'WORDS!' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'plugins' : { #NEWLINE# #INDENT# 'twisted_web.py' : 'import WEBPLUG' , #NEWLINE# 'twisted_words.py' : 'import WORDPLUG' , #NEWLINE# 'twisted_web2.py' : 'import WEB2' , #NEWLINE# 'twisted_vfs.py' : 'import VFS' , #NEWLINE# 'twisted_yay.py' : 'import YAY' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'doc' : { #NEWLINE# #INDENT# 'web2' : { #NEWLINE# #INDENT# 'excluded!' : 'yay' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'vfs' : { #NEWLINE# #INDENT# 'unrelated' : 'whatever' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'core' : { #NEWLINE# #INDENT# 'howto' : { #NEWLINE# #INDENT# 'template.tpl' : self . template , #NEWLINE# #UNINDENT# } , #NEWLINE# 'index.xhtml' : coreIndexInput , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# twistedStructure = { #NEWLINE# #INDENT# 'README' : 'Twisted' , #NEWLINE# 'unrelated' : 'x' , #NEWLINE# 'LICENSE' : 'copyright!' , #NEWLINE# 'setup.py' : 'import toplevel' , #NEWLINE# 'bin' : { #NEWLINE# #INDENT# 'twistd' : 'TWISTD' , #NEWLINE# 'words' : { #NEWLINE# #INDENT# 'im' : 'import im' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'twisted' : { #NEWLINE# #INDENT# 'topfiles' : { #NEWLINE# #INDENT# 'setup.py' : 'import TOPINSTALL' , #NEWLINE# 'README' : 'CORE!' , #NEWLINE# #UNINDENT# } , #NEWLINE# '_version.py' : genVersion ( 'twisted' , 1 , 2 , 0 ) , #NEWLINE# 'words' : { #NEWLINE# #INDENT# '__init__.py' : 'import WORDS' , #NEWLINE# '_version.py' : genVersion ( 'twisted.words' , 1 , 2 , 0 ) , #NEWLINE# 'topfiles' : { #NEWLINE# #INDENT# 'setup.py' : 'import WORDSINSTALL' , #NEWLINE# 'README' : 'WORDS!' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'plugins' : { #NEWLINE# #INDENT# 'twisted_web.py' : 'import WEBPLUG' , #NEWLINE# 'twisted_words.py' : 'import WORDPLUG' , #NEWLINE# 'twisted_yay.py' : 'import YAY' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'doc' : { #NEWLINE# #INDENT# 'core' : { #NEWLINE# #INDENT# 'howto' : { #NEWLINE# #INDENT# 'template.tpl' : self . template , #NEWLINE# #UNINDENT# } , #NEWLINE# 'index.html' : coreIndexOutput , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# coreStructure = { #NEWLINE# #INDENT# 'setup.py' : 'import TOPINSTALL' , #NEWLINE# 'README' : 'CORE!' , #NEWLINE# 'LICENSE' : 'copyright!' , #NEWLINE# 'bin' : { #NEWLINE# #INDENT# 'twistd' : 'TWISTD' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'twisted' : { #NEWLINE# #INDENT# '_version.py' : genVersion ( 'twisted' , 1 , 2 , 0 ) , #NEWLINE# 'plugins' : { #NEWLINE# #INDENT# 'twisted_yay.py' : 'import YAY' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'doc' : { #NEWLINE# #INDENT# 'howto' : { #NEWLINE# #INDENT# 'template.tpl' : self . template , #NEWLINE# #UNINDENT# } , #NEWLINE# 'index.html' : coreIndexOutput , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# wordsStructure = { #NEWLINE# #INDENT# 'README' : 'WORDS!' , #NEWLINE# 'LICENSE' : 'copyright!' , #NEWLINE# 'setup.py' : 'import WORDSINSTALL' , #NEWLINE# 'bin' : { #NEWLINE# #INDENT# 'im' : 'import im' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'twisted' : { #NEWLINE# #INDENT# 'words' : { #NEWLINE# #INDENT# '__init__.py' : 'import WORDS' , #NEWLINE# '_version.py' : genVersion ( 'twisted.words' , 1 , 2 , 0 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'plugins' : { #NEWLINE# #INDENT# 'twisted_words.py' : 'import WORDPLUG' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . createStructure ( checkout , structure ) #NEWLINE# childs = [ x . path for x in checkout . children ( ) ] #NEWLINE# runCommand ( ( [ 'svn' , 'add' ] + childs ) ) #NEWLINE# runCommand ( [ 'svn' , 'commit' , checkout . path , '-m' , 'yay' ] ) #NEWLINE# buildAllTarballs ( checkout , self . outputDir ) #NEWLINE# self . assertEquals ( set ( self . outputDir . children ( ) ) , set ( [ self . outputDir . child ( 'Twisted-1.2.0.tar.bz2' ) , self . outputDir . child ( 'TwistedCore-1.2.0.tar.bz2' ) , self . outputDir . child ( 'TwistedWords-1.2.0.tar.bz2' ) ] ) ) #NEWLINE# self . assertExtractedStructure ( self . outputDir . child ( 'Twisted-1.2.0.tar.bz2' ) , twistedStructure ) #NEWLINE# self . assertExtractedStructure ( self . outputDir . child ( 'TwistedCore-1.2.0.tar.bz2' ) , coreStructure ) #NEWLINE# self . assertExtractedStructure ( self . outputDir . child ( 'TwistedWords-1.2.0.tar.bz2' ) , wordsStructure )