📄 makerun_test
字号:
#!/bin/sh### # makerun_test - Shell script for creating a test launching wrapper## Copyright (C) 2005-2006 Vladimir Bashkardin## 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 2 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 av.## You should have received a copy of the GNU General Public# License along with this program; if not, write to the# Free Software Foundation, Inc., 59 Temple Place - Suite 330,# Boston, MA 02111-1307, USA.## Author: Vladimir Bashkardin <vovizmus@users.sourceforge.net>#if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then echo "Please specify shell script, library path and test product path" exit 0fiFILENAME=$1.shLDPATH=$2BINPATH=$3echo '#!/bin/sh' >$FILENAMEecho '##' >>$FILENAMEecho >>$FILENAMEecho 'CURR_DIR=`pwd`' >>$FILENAMEecho 'DIR=`echo $0 | sed -e "s/\(.*\)\/'$1'\.sh/\1/g"`' >>$FILENAMEecho 'cd $DIR' >>$FILENAMEecho >>$FILENAMEecho "export LD_LIBRARY_PATH=$LDPATH"':$LD_LIBRARY_PATH' >>$FILENAMEecho 'if [ -z $1 ]; then' >>$FILENAMEecho " $BINPATH/$1" >>$FILENAMEecho 'elif [ "$1" == "DD" ]; then' >>$FILENAMEecho " ddd $BINPATH/$1" >>$FILENAMEecho 'elif [ "$1" == "VG" ]; then' >>$FILENAMEecho " valgrind --log-fd=2 --tool=memcheck --error-limit=no $BINPATH/$1 2>/tmp/$1-valgrind.log" >>$FILENAMEecho " $EDITOR /tmp/$1-valgrind.log" >>$FILENAMEecho 'elif [ "$1" == "MP" ]; then' >>$FILENAMEecho " valgrind --log-fd=2 --tool=memcheck --error-limit=no --leak-check=yes --show-reachable=yes $BINPATH/$1 2>/tmp/$1-valgrind-leaks.log" >>$FILENAMEecho " $EDITOR /tmp/$1-valgrind-leaks.log" >>$FILENAMEecho 'fi' >>$FILENAMEecho 'cd $CURR_DIR' >>$FILENAMEchmod 755 $FILENAME
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -