1# Copyright (C) 2016 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15'''Module that contains the test TestBreakpointKernel2.''' 16 17from __future__ import absolute_import 18 19from harness.test_base_remote import TestBaseRemote 20 21 22class TestBreakpointKernel2(TestBaseRemote): 23 '''Tests the setting of a breakpoint on a RS kernel.''' 24 25 bundle_target = { 26 'java': 'JavaInfiniteLoop', 27 'jni': 'JNIInfiniteLoop', 28 'cpp': 'CppInfiniteLoop' 29 } 30 31 def test_breakpoint_resolution_simple_kernel(self): 32 # pylint: disable=line-too-long 33 self.try_command('language renderscript kernel breakpoint set simple_kernel', 34 ['Breakpoint(s) created']) 35 36 self.try_command('process continue', 37 ['resuming', 38 'stopped', 39 'stop reason = breakpoint']) 40 41 self.try_command('bt', 42 ['stop reason = breakpoint', 43 'frame #0:', 44 'librs.infiniteloop.so', 45 'simple_kernel'], 46 [r'infiniteloop\.rs:4[34]']) 47 48 self.try_command('breakpoint list', 49 ['simple_kernel', 50 'resolved = 1']) 51 52 self.try_command('process status', 53 ['stopped', 54 '.so`simple_kernel', 55 'stop reason = breakpoint']) 56