]>
Commit | Line | Data |
---|---|---|
1d506c26 | 1 | # Copyright 2022-2024 Free Software Foundation, Inc. |
18b4d073 SM |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
16 | # A simple AMD GPU debugging smoke test. Run to a breakpoint in device code, | |
17 | # then continue until the end of the program. | |
18 | ||
19 | load_lib rocm.exp | |
20 | ||
21 | standard_testfile .cpp | |
22 | ||
09ad7eb8 | 23 | require allow_hipcc_tests |
18b4d073 SM |
24 | |
25 | if {[build_executable "failed to prepare" $testfile $srcfile {debug hip}]} { | |
26 | return | |
27 | } | |
28 | ||
29 | proc do_test {} { | |
30 | clean_restart $::binfile | |
31 | ||
32 | with_rocm_gpu_lock { | |
33 | if ![runto_main] { | |
34 | return | |
35 | } | |
36 | ||
37 | gdb_test "with breakpoint pending on -- break do_an_addition" \ | |
38 | "Breakpoint $::decimal \\(do_an_addition\\) pending." | |
39 | ||
40 | gdb_test "continue" \ | |
41 | "Thread $::decimal hit Breakpoint $::decimal, do_an_addition .*" | |
42 | ||
43 | gdb_test "continue" \ | |
44 | "Inferior 1 .* exited normally.*" \ | |
45 | "continue to end" | |
46 | } | |
47 | } | |
48 | ||
49 | do_test |