summary refs log tree commit diff stats
path: root/tests/notnil
Commit message (Expand)AuthorAgeFilesLines
* fixes #2352Araq2015-03-161-1/+7
* fixes #2216Araq2015-02-261-0/+27
* Added notnil test for issue #1216Clay Sweetser2014-06-181-0/+14
* fixes #584Araq2014-02-141-0/+35
* new tester; all tests categorizedAraq2014-01-133-0/+87
29a51a343dec303ec'>^
99ad65fdd ^
d9c150175 ^
fd3583803 ^
d9c150175 ^
fd3583803 ^
28394153a ^
97d37aeb0 ^
97d37aeb0 ^







fd3583803 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25




                        

                                                         
                                                                    
 
                                                                  
                                                               
    
                                                               
  
 
                                                    







                                                                      
                                                                     
#!/usr/bin/env bash

# Exit if anything fails
set -e

which nim > /dev/null || (echo "nim not in PATH"; exit 1)
which gdb > /dev/null || (echo "gdb not in PATH"; exit 1)
which readlink > /dev/null || (echo "readlink not in PATH."; exit 1)

if [[ "$(uname -s)" == "Darwin" || "(uname -s)" == *"BSD" ]]; then
  NIM_SYSROOT=$(dirname $(dirname $(readlink -f $(which nim))))
else
  NIM_SYSROOT=$(dirname $(dirname $(readlink -e $(which nim))))
fi

# Find out where the pretty printer Python module is
GDB_PYTHON_MODULE_PATH="$NIM_SYSROOT/tools/nim-gdb.py"

# Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `NIM_GDB` to overwrite the call to a
# different/specific command (defaults to `gdb`).
NIM_GDB="${NIM_GDB:-gdb}"
# exec replaces the new process of bash with gdb. It is always good to
# have fewer processes.
exec "${NIM_GDB}" -eval-command="source $GDB_PYTHON_MODULE_PATH" "$@"