⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 runtest

📁 su 的源代码库
💻
字号:
########################################################################## Invocation arguments are:						##	-lLIBRARY: a library to be linked with, e.g., -lpthread		##	-ut: testing the uni-threaded libsfio.a (default)		##	-mt: testing the multi-threaded libsfio-mt.a			##	-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.					##									## Below are a few example test runs:					##	runtest:							##		tests the uni-threaded library.				##	runtest -mt:							##		tests the multi-threaded library on a BSD platform.	##	runtest -mt -lpthread:						##		tests the multi-threaded library on a			##		Linux/Irix/Solaris platform.				##	runtest -mt -lcma:						##		tests the multi-threaded library on a HPUX platform.	##		The argument -lcma defines the thread library.		##									## Written by Kiem-Phong Vo 						##########################################################################verbose=0exit_on_fail=1files=""LIBS="../libsfio.a ../Stdio_b/libstdio.a"HDRS="-I../Stdio_s -I.."DEFS="-Dvt_threaded=0"XLIBS=""while test "$1" != ""do	case $1 in	-l*) 	XLIBS="$XLIBS $1";		;;	-v)	verbose=1;		;;	-c)	exit_on_fail=0;		;;	-ut)	LIBS="../libsfio.a ../Stdio_b/libstdio.a";		DEFS="-Dvt_threaded=0";		;;	-mt)	LIBS="../libsfio-mt.a ../Stdio_b/libstdio-mt.a ../../vthread/libvthread.a";		DEFS="-Dvt_threaded=1";		;;	-*)	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 $HDRS xxx.c $LIBS -o ./t"fifor i in $filesdo	echo "-- $i:"	status=""	if $CC -g $DEFS $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 + -