#NEWLINE# def testAbsoluteChangeSet( self ) : #NEWLINE# #INDENT# self . resetRepository ( ) #NEWLINE# d = tempfile . mkdtemp ( ) #NEWLINE# origDir = os . getcwd ( ) #NEWLINE# os . chdir ( d ) #NEWLINE# self . writeFile ( 'testcase.recipe' , recipes . testRecipe1 ) #NEWLINE# repos = self . openRepository ( ) #NEWLINE# try : #NEWLINE# #INDENT# ( built , str ) = self . captureOutput ( self . cookItem , repos , self . cfg , 'testcase.recipe' ) #NEWLINE# cs = changeset . ChangeSetFromFile ( 'testcase-1.0.ccs' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# os . chdir ( origDir ) #NEWLINE# shutil . rmtree ( d ) #NEWLINE# #UNINDENT# ( rc , res ) = self . captureOutput ( displayChangeSet , None , cs , None , self . cfg ) #NEWLINE# assert ( res == 'testcase=1.0-1-0.1\n' ) #NEWLINE# ( rc , res ) = self . captureOutput ( displayChangeSet , None , cs , [ 'testcase=1.0-1-0.1' ] , self . cfg , showTroves = True ) #NEWLINE# assert ( res == 'testcase=1.0-1-0.1\n  testcase:runtime=1.0-1-0.1\n' ) #NEWLINE# ( rc , res ) = self . captureOutput ( displayChangeSet , None , cs , [ 'testcase:runtime=1.0-1-0.1' ] , self . cfg , fileVersions = True , alwaysDisplayHeaders = True ) #NEWLINE# assert ( res == 'testcase:runtime=1.0-1-0.1\n  /etc/changedconfig    1.0-1-0.1\n  /etc/unchangedconfig    1.0-1-0.1\n  /usr/bin/hello    1.0-1-0.1\n  /usr/share/changed    1.0-1-0.1\n  /usr/share/unchanged    1.0-1-0.1\n' ) #NEWLINE# ( rc , res ) = self . captureOutput ( displayChangeSet , None , cs , [ 'testcase:runtime=1.0-1-0.1' ] , self . cfg , lsl = True ) #NEWLINE# lines = res . split ( '\n' ) #NEWLINE# files = self . _parseFileList ( lines ) #NEWLINE# assert ( len ( files ) == 5 ) #NEWLINE# paths = files . keys ( ) #NEWLINE# paths . sort ( ) #NEWLINE# assert ( paths == [ '/etc/changedconfig' , '/etc/unchangedconfig' , '/usr/bin/hello' , '/usr/share/changed' , '/usr/share/unchanged' ] ) #NEWLINE# for f in files . values ( ) : #NEWLINE# #INDENT# assert ( f . change == 'New' ) #NEWLINE# #UNINDENT# ( rc , res ) = self . captureOutput ( displayChangeSet , None , cs , [ 'testcase:runtime=1.0-1-0.1' ] , self . cfg , info = True ) #NEWLINE# assert ( 'testcase:runtime' in res ) #NEWLINE# assert ( '1.0-1-0.1' in res ) #NEWLINE# assert ( 'is: x86' in self ) #NEWLINE# ( rc , res ) = self . captureOutput ( displayChangeSet , None , cs , [ 'testcase:runtime=1.0-1-0.1' ] , self . cfg , asDiff = True )