📄 runtest
字号:
########################################################################## Invocation arguments are: ## -lLIBRARY: a library to be linked with, e.g., -lpthread ## -v: verbose, print the compilation command ## -c: continue testing after a test fails ## -whatever_else: bad argument, will be ignored. ## tests: test cases to be run. If no test specified, ## all tests will be run. ## ## Written by Kiem-Phong Vo ##########################################################################verbose=0exit_on_fail=1files=""LIBS="../libvthread.a"HDRS=""DEFS="-Dvt_threaded=1"XLIBS=""while test "$1" != ""do case $1 in -l*) XLIBS="$XLIBS $1"; ;; -v) verbose=1; ;; -c) exit_on_fail=0; ;; -*) echo "Hmm, unknown argument: $1"; ;; *) files="${files} $1"; ;; esac shiftdoneif test "$CC" = ""; then CC="cc"; fiif test "$files" = ""then files="*.c"fiLIBS="$LIBS $XLIBS"if test "$verbose" = 1then echo "Compiler invocation: $CC -g $DEFS -I. -I.. $HDRS xxx.c $LIBS -o ./t"fifor i in $filesdo echo "-- $i:" status="" if $CC -g $DEFS -I. -I.. $HDRS $i $LIBS -o ./t then if ./t then rm ./t; status=Passed else status=Failed fi else status="Not compiled" fi echo " $status" if test "$status" != "Passed" then if test "$exit_on_fail" = "1"; then exit; fi fidone
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -