@ -63,7 +63,7 @@ class TestData:
def __del__ ( self ) :
def __del__ ( self ) :
shutil . rmtree ( self . path )
shutil . rmtree ( self . path )
def add ( self , name , unstable , fields = { } , add_src = True ):
def add ( self , name , unstable , fields = { } , add_src = True , testsuite = None ):
''' Add a binary package to the index file.
''' Add a binary package to the index file.
You need to specify at least the package name and in which list to put
You need to specify at least the package name and in which list to put
@ -73,7 +73,8 @@ class TestData:
fields .
fields .
Unless add_src is set to False , this will also automatically create a
Unless add_src is set to False , this will also automatically create a
source record , based on fields [ ' Source ' ] and name .
source record , based on fields [ ' Source ' ] and name . In that case , the
" Testsuite: " field is set to the testsuite argument .
'''
'''
assert ( name not in self . added_binaries [ unstable ] )
assert ( name not in self . added_binaries [ unstable ] )
self . added_binaries [ unstable ] . add ( name )
self . added_binaries [ unstable ] . add ( name )
@ -93,8 +94,11 @@ class TestData:
if add_src :
if add_src :
src = fields . get ( ' Source ' , name )
src = fields . get ( ' Source ' , name )
if src not in self . added_sources [ unstable ] :
if src not in self . added_sources [ unstable ] :
self . add_src ( src , unstable , { ' Version ' : fields [ ' Version ' ] ,
srcfields = { ' Version ' : fields [ ' Version ' ] ,
' Section ' : fields [ ' Section ' ] } )
' Section ' : fields [ ' Section ' ] }
if testsuite :
srcfields [ ' Testsuite ' ] = testsuite
self . add_src ( src , unstable , srcfields )
def add_src ( self , name , unstable , fields = { } ) :
def add_src ( self , name , unstable , fields = { } ) :
''' Add a source package to the index file.
''' Add a source package to the index file.
@ -102,7 +106,8 @@ class TestData:
You need to specify at least the package name and in which list to put
You need to specify at least the package name and in which list to put
it ( unstable == True for unstable / proposed , or False for
it ( unstable == True for unstable / proposed , or False for
testing / release ) . fields specifies all additional entries , which can be
testing / release ) . fields specifies all additional entries , which can be
Version ( default : 1 ) , Section ( default : devel ) , and Extra - Source - Only .
Version ( default : 1 ) , Section ( default : devel ) , Testsuite ( default :
none ) , and Extra - Source - Only .
'''
'''
assert ( name not in self . added_sources [ unstable ] )
assert ( name not in self . added_sources [ unstable ] )
self . added_sources [ unstable ] . add ( name )
self . added_sources [ unstable ] . add ( name )