check_add.sh

来自「ncbi源码」· Shell 代码 · 共 111 行

SH
111
字号
#! /bin/sh# $Id: check_add.sh,v 1000.0 2003/10/30 16:33:01 gouriano Exp $# Author:  Vladimir Ivanov, NCBI ############################################################################## Buid list files to checking in the build tree.## Usage: (Run only from Makefile.meta)#    check_add.sh <project_srcdir> <project_name> <signature> [<exeextension>]## Example:#    check_add.sh ~/c++/src/html/test test_jsmenu  \#                 GCC_295-Debug--sparc-sun-solaris2.8-serpens## Note:#    1) Environment variable CHECK_RUN_LIST must be set;#    2) We assume that current work dir is <project_name> in build dir.#    3) If environment variable CHECK_USE_IGNORE_LIST is 'Y' that the name #       of the current test will be checked in ignore list#       (src/check/ignore.lst). And if it present in list that this test #       will be skipped. By default this variable is 'Y'.############################################################################# Parametersx_out=$CHECK_RUN_LISTx_srcdir=`(cd "$1"; pwd)`x_test=$2x_signature=$3x_exeext=$4x_use_ignore_list=${CHECK_USE_IGNORE_LIST-Y}x_delim=" ____ "# Default timeout for check (in seconds)x_timeout_default=200# Convert source dir to relative pathx_srcdir_rel=`echo "$x_srcdir" | sed -e 's%^.*/src/%%'`# Check to necessity make test for this applicationif test ! -f "$x_srcdir/Makefile.$x_test.app";  then   echo "Warning: File \"$x_srcdir/Makefile.$x_test.app\" not found."   exit 0fi# Get app namex_app=`grep '^ *APP[ =]' "$x_srcdir/Makefile.$x_test.app"`x_app=`echo "$x_app" | sed -e 's/^.*=//' -e 's/^ *//'`x_tpath=`echo "$x_srcdir/$x_test" | sed 's%^.*/src/%%'`if grep -c '^ *CHECK_CMD' $x_srcdir/Makefile.$x_test.app > /dev/null ; then    # Check ignore list   x_use_ignore_list=`echo $x_use_ignore_list | tr '[a-z]' '[A-Z]' | sed -e 's/^\(.\).*/\1/g'`   if test "$x_use_ignore_list"=='Y' ; then      x_signature=`echo $x_signature | sed 's/-[a-z.]*$//'`      root_dir=`echo "$x_srcdir" | sed 's%/src/.*$%%'`      ignore_list="$root_dir/src/check/ignore.lst"      if grep "^ *$x_srcdir_rel/$x_app *$x_signature" $ignore_list > /dev/null 2>&1; then         echo "SKIP -- $x_tpath"         exit 0      fi   fi   echo "TEST -- $x_tpath"else    echo "SKIP -- $x_tpath"   exit 0fi# Add exe extension if necessryx_app=$x_app$x_exeext# Get cmd-lines to run testx_run=`grep '^ *CHECK_CMD' "$x_srcdir/Makefile.$x_test.app" | sed 's/^[^=]*=//'`if test -z "$x_run"; then   # If command line not defined, then just run the test without parameters   x_run="$x_app$x_exeext"fix_run=`echo "$x_run" | sed -e 's/ /%gj_s4%/g'`# Specified files to copy to the build directoryx_files=`grep '^ *CHECK_COPY' "$x_srcdir/Makefile.$x_test.app" | sed -e 's/^.*=//' -e 's/^.[ ]*//'`# Get application's check timeoutx_timeout=`grep '^ *CHECK_TIMEOUT' "$x_srcdir/Makefile.$x_test.app" | sed -e 's/^.*=//' -e 's/^.[ ]*//'`x_timeout="${x_timeout:-$x_timeout_default}"# Get application's requirementx_requires=`grep '^ *CHECK_REQUIRES' "$x_srcdir/Makefile.$x_test.app" | sed -e 's/^.*=//' -e 's/^.[ ]*//'`if test -z "$x_requires"; then   x_requires=`grep '^ *REQUIRES' "$x_srcdir/Makefile.$x_test.app" | sed -e 's/^.*=//' -e 's/^.[ ]*//'`fi# Write data about current test into the list filefor x_cmd in $x_run; do    x_cmd=`echo "$x_cmd" | sed -e 's/%gj_s4%/ /g' | sed -e 's/^ *//' | sed -e 's/\"/\\\\"/g'`    echo "$x_srcdir_rel$x_delim$x_test$x_delim$x_app$x_delim$x_cmd$x_delim$x_files$x_delim$x_timeout$x_delim$x_requires" >> $x_outdoneexit 0# #  ===========================================================================#  PRODUCTION $Log: check_add.sh,v $#  PRODUCTION Revision 1000.0  2003/10/30 16:33:01  gouriano#  PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.15#  PRODUCTION#  ===========================================================================# 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?