run_inet 841 B

1234567891011121314151617181920212223242526272829303132
  1. #! /bin/sh
  2. DIR=`dirname $0`
  3. TOOL=""
  4. # start with valgrind if the first argument is --valgrind
  5. VALGRIND_OPTIONS="-v --tool=memcheck --leak-check=yes --show-reachable=no --leak-resolution=high --num-callers=40 --freelist-vol=4000000"
  6. if [ "$1" = "--valgrind" ] ; then
  7. echo "##### Running with Valgrind! ######"
  8. TOOL="valgrind $VALGRIND_OPTIONS"
  9. shift
  10. fi
  11. # start with gdb if the first argument is --gdb
  12. GDB_OPTIONS="-quiet -ex run"
  13. if [ "$1" = "--gdb" ] ; then
  14. echo "##### Running with GDB! ######"
  15. TOOL="gdb $GDB_OPTIONS --args"
  16. shift
  17. fi
  18. OPP_OPTIONS="-n $DIR:$DIR/../tutorials:$DIR/../showcases:$DIR/../examples --image-path=$DIR/../images $@"
  19. if [ -f $DIR/INET ]; then
  20. $TOOL $DIR/INET $OPP_OPTIONS
  21. elif [ -f $DIR/INET.exe ]; then
  22. $TOOL $DIR/INET.exe $OPP_OPTIONS
  23. else
  24. $TOOL opp_run -l $DIR/INET $OPP_OPTIONS
  25. fi