add & use terminate hook for bsp reset to let tests terminate