mkcheck.in: Clean up confusion regarding NAME, PRE_NAME.

2000-06-12  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* mkcheck.in: Clean up confusion regarding NAME, PRE_NAME.

From-SVN: r34510
This commit is contained in:
Benjamin Kosnik 2000-06-12 23:56:56 +00:00 committed by Benjamin Kosnik
parent 431f67e296
commit d54a528ae4
2 changed files with 16 additions and 11 deletions

View File

@ -1,3 +1,7 @@
2000-06-12 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* mkcheck.in: Clean up confusion regarding NAME, PRE_NAME.
2000-06-08 Branko Cibej <branko.cibej@hermes.si>
* acinclude.m4 (GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT): Check for

View File

@ -165,10 +165,13 @@ test_file()
{
# NB: S_FLAG has to be last argument because it may be null, and
# error checking hasn't been invented yet.
FILENAME=$1
NAME=$1
EXENAME=$2
S_FLAG=$3
SRC_NAME="$SRC_DIR/testsuite/$1"
TEST_NAME="$TEST_DIR/`basename $NAME`"
# This would be deliciously easy if GNU date's %s were always around.
# There are three ways to do this: 1) use the builtin 'time' like we
# do later; then getting compiler errors into LOG_FILE is a nightmare.
@ -178,7 +181,7 @@ test_file()
# time_t's (no more overhead than grabbing two date(1)'s).
COMP_TIME_START=$($TEST_DIR/printnow)
$CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,--rpath -Wl,$LIB_PATH \
$FILENAME -o $EXENAME 2>> $LOG_FILE
$SRC_NAME -o $EXENAME 2>> $LOG_FILE
COMP_TIME_END=$($TEST_DIR/printnow)
if [ $COMP_TIME_START -lt $COMP_TIME_END ]; then
@ -250,7 +253,7 @@ test_file()
# ls on MATCH, a pattern description generated with sed.
# this is the name of the resulting diff file, if any
DIFF_FILE="`echo $PRE_NAME | sed 's/cc$/diff/'`"
DIFF_FILE="`echo $TEST_NAME | sed 's/cc$/diff/'`"
# construct wildcard names,ie for $NAME=filebuf.cc, makes
# "filebuf*.tst"
DATA_FILES="`echo $NAME | sed 's/\.cc/\*\.tst/g'`"
@ -280,15 +283,14 @@ test_file()
RESULT="+"
fi
fi
rm "$EXENAME"
# sometimes you want to save all failing exe files for review:
#if [ "$RESULT" = "+" ]; then
# rm "$EXENAME"
#fi
if [ "$RESULT" = "+" ]; then
rm "$EXENAME"
fi
else
# the file did not compile. Write out compilation info to the log file.
echo "$CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,--rpath -Wl,$LIB_PATH \
$FILENAME -o $EXENAME" 2>> $LOG_FILE
$SRC_NAME -o $EXENAME" 2>> $LOG_FILE
RESULT="-"
TEXT="0"
@ -317,10 +319,9 @@ do
PRE_NAME="$TEST_DIR/`basename $NAME`"
ST_NAME="`echo $PRE_NAME | sed 's/cc$/st-exe/'`"
SH_NAME="`echo $PRE_NAME | sed 's/cc$/sh-exe/'`"
CNAME="$SRC_DIR/testsuite/$NAME"
test_file $CNAME $ST_NAME $ST_FLAG
test_file $CNAME $SH_NAME $SH_FLAG
test_file $NAME $ST_NAME $ST_FLAG
test_file $NAME $SH_NAME $SH_FLAG
echo "$NAME" | awk '{printf("%s\n", $1)}'
echo "" >> $RESULTS_FILE