tests: Improve debug script

main
Sean McBride 4 years ago
parent f3c037475c
commit 39fea2db44

@ -1,7 +1,19 @@
#!/bin/bash #!/bin/bash
# Executes the runtime in GDB with SIGU # Executes the runtime in GDB
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
# This allows debugging outside of the Docker container
# Also disables pagination and stopping on SIGUSR1
declare project_path="$(
cd "$(dirname "$1")/../.."
pwd
)"
echo $project_path
cd ../../bin cd ../../bin
export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH"
gdb --eval-command="handle SIGUSR1 nostop" --eval-command="run ../tests/preemption/test_fibonacci_multiple.json" ./awsmrt gdb --eval-command="handle SIGUSR1 nostop" \
--eval-command="set pagination off" \
--eval-command="set substitute-path /awsm/runtime $project_path" \
--eval-command="run ../tests/preemption/test_fibonacci_multiple.json" \
./awsmrt
cd ../../tests cd ../../tests

Loading…
Cancel
Save