本文整理汇总了Python中stack.Stack.root_user_dir方法的典型用法代码示例。如果您正苦于以下问题:Python Stack.root_user_dir方法的具体用法?Python Stack.root_user_dir怎么用?Python Stack.root_user_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stack.Stack
的用法示例。
在下文中一共展示了Stack.root_user_dir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_FunctionCallTree
# 需要导入模块: from stack import Stack [as 别名]
# 或者: from stack.Stack import root_user_dir [as 别名]
def test_FunctionCallTree(self):
current_dir = os.getcwd()
test = Stack() #ThreadQuery()
test.compiler="gcc"
test.root_user_dir = join(current_dir,"qualification")
test.root_user_dir = join(test.root_user_dir,"SET_G7000_ACENM")
test.src_user_dir = "Software"
test.src_user_dir = join(test.src_user_dir,"SW_ACENM_CODE")
test.build_user_dir = test.src_user_dir
test.src_user_dir = join(test.src_user_dir,"SRC")
test.build_user_dir = join(test.build_user_dir,"BUILD")
dico_function_vs_stack_size = test._getStackFromAsm()
print ("dico_function_vs_stack_size",dico_function_vs_stack_size)
print (len(dico_function_vs_stack_size))
one_leaf = ['CtlBoot_P_Init', 'CtlStartup_G_Manager', 'DplCanRx_G_Init', '', '', '', '', '', '', '', '', '']
compute_stack = test._computeStackSize(one_leaf,
dico_function_vs_stack_size)
assert(compute_stack==208)
max_stack_size,max_function_call_tree = test._stackAnalysis()
test._computeLeaves()
assert(max_stack_size==208)