(opts)
return {
        'testfile': opts.testfile,
        'heaplimit to pass': goodheap
    }
Find the minimal size of jerryheap to pass
Find the minimal size of jerryheap to pass
Find the minimal size of jerryheap to pass
def heap_limit(opts):
    """ Find the minimal size of jerryheap to pass """
    goodheap = opts.heapsize
    lowheap = 0
    hiheap = opts.heapsize

    while lowheap < hiheap:
        build_bin(hiheap, opts)
        assert os.path.isfile(JERRY_BIN), 'Jerry binary file does not exists'

        exitcode = run_test(opts)
        if exitcode != 0:
            lowheap = hiheap
            hiheap = (lowheap + goodheap) // 2
        else:
            goodheap = hiheap
            hiheap = (lowheap + hiheap) // 2

    return {
        'testfile': opts.testfile,
        'heaplimit to pass': goodheap
    }
def heap_limit ( opts ) : goodheap = opts . heapsize lowheap = 0 hiheap = opts . heapsize while lowheap < hiheap : build_bin ( hiheap , opts ) assert os . path . isfile ( JERRY_BIN ) , 'Jerry binary file does not exists' exitcode = run_test ( opts ) if exitcode != 0 : lowheap = hiheap hiheap = ( lowheap + goodheap ) // 2 else : goodheap = hiheap hiheap = ( lowheap + hiheap ) // 2 return { 'testfile' : opts . testfile , 'heaplimit to pass' : goodheap }