fix smoketests

This commit is contained in:
Rob Taylor 2023-09-18 13:37:09 +01:00 committed by Rob Taylor
parent 2c5493c90b
commit d806b9d586
2 changed files with 11 additions and 40 deletions

View File

@ -7,7 +7,7 @@ def flush ():
sys.stderr.flush()
import Cfg
from coriolis import Cfg
print( "" )
print( "Test 7" )
@ -152,13 +152,16 @@ for key in testDict:
flush()
flush()
print( 'has key "machin":{}'.format('machin' in testDict) )
flush()
params = cfg.getParameters()
print( 'params["test.master"] = %s' % params['test.master'] )
flush()
try:
print( 'params.has_key("test.master") = {}'.format('test.master' in params) )
#print( 'params.has_key("test.master") = {}'.format(params.has_key('test.master') ))
#print( 'params.has_key("test.master") = {}'.format(params.has_key('test.master') ))
print( 'params.has_key("test.slave6") = {}'.format('test.slave6' in params) )
print( 'params["test.slave6"] = %s' % params['test.slave6'] )
flush()
except KeyError as ke:
print( ke )
print( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" )

View File

@ -1,11 +1,11 @@
#!/usr/bin/env python3
import sys
import Cfg
from Hurricane3 import DbU, Point, Box, DataBase, Technology, LayerMask, \
from coriolis import Cfg
from coriolis.Hurricane import DbU, Point, Box, DataBase, Technology, \
BasicLayer, ViaLayer, RegularLayer
from overlay import CfgCache
from technology import createBL
from coriolis.helpers.overlay import CfgCache
from coriolis.helpers.technology import createBL
def flush ():
sys.stdout.flush()
@ -155,7 +155,6 @@ def testDB ():
print( "========================================" )
db = DataBase.create()
print( 'DataBase.getDB()={}'.format(DataBase.getDB()) )
print( 'DataBase.Flags.CreateLib={}'.format(DataBase.Flags.CreateLib) )
def testTechnology ():
@ -166,36 +165,6 @@ def testTechnology ():
print( 'tech={}'.format(tech) )
def testLayerMask ():
print( "" )
print( "Test Hurricane::Layer::Mask" )
print( "========================================" )
mask16 = LayerMask( 16 )
print( 'mask16= {}'.format(mask16) )
mask32 = LayerMask( 16+32 )
print( 'mask16= {}'.format(mask32) )
maskAnd = mask16 & mask32
print( 'maskAnd={}'.format(maskAnd) )
try:
maskAnd = mask16 & 4
print( 'maskAnd={}'.format(maskAnd) )
except Exception as e:
print( 'Catched and exception...' )
print( e )
maskShift = maskAnd << 1
print( 'maskShift={}'.format(maskShift) )
maskNot = ~maskAnd
print( 'maskNot={}'.format(maskNot) )
print( 'maskAnd={}'.format(maskAnd) )
mask64 = LayerMask( 64+16 )
print( 'mask64={}'.format(mask64) )
mask64 &= LayerMask( 64 )
print( 'mask64={}'.format(mask64) )
mask64 |= LayerMask( 16 )
print( 'mask64={}'.format(mask64) )
mask64.fromString( '0x0000ffff' )
print( 'mask64={}'.format(mask64) )
def testBasicLayer ():
print( "" )
@ -229,6 +198,5 @@ if __name__ == '__main__':
testBox()
testDB()
testTechnology()
testLayerMask()
testBasicLayer()
sys.exit( 0 )