# Copyright (C) March 2023-2024 Linaro Limited (or its affiliates). All rights reserved.

# Copyright (C) 1995-2023 Arm Limited (or its affiliates). All rights reserved.

# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
Running these tests can be tricky, see infrastructure/gdb for how we run them through the infrastructure. At the time of writing to run the testsuite manually, I create the file gdb/testsuite/boards/inject.exp with the following contents.

set_board_info gdb_prompt "\\(cuda-gdb\\)"
set_board_info compiler nvcc
set_board_info c++compiler nvcc
set_board_info f77compiler $::env(FC)
set_board_info f90compiler $::env(FC)
set_board_info multitop ""
set_board_info cflags "-G"

To run, I first load the cuda module and then do from the root build directory

   make check-gdb RUNTESTFLAGS="gdb.cuda/*.exp --target_board=inject"

