# the names of the specific test files to be run
TESTS_FILE="$TEST_DIR/$(date +%Y%m%d)-mkcheckfiles.txt"
-# the heap size and virtual mem limit for testsuite binaries
-# See http://gcc.gnu.org/ml/libstdc++/2000-10/msg00029.html
-MAX_MEM_USAGE=16384
#
# 2: clean, make files, append general test info
# Make a list of the files we're going to run, or use an old one if it exists.
if [ ! -f "$TESTS_FILE" ]; then
+ if [ -f "$TEST_DIR/testsuite_files" ]; then
+ cp $TEST_DIR/testsuite_files $TESTS_FILE
+ else
echo "making file $TESTS_FILE"
for LONG_NAME in $SRC_DIR/testsuite/*/*.cc
do
SHORT_NAME="`basename $DIR_NAME`/`basename $LONG_NAME`"
echo "$SHORT_NAME" >> $TESTS_FILE
done
+ fi
fi
# Nasty solution to replace GNU date(1)'s %s time_t output function.
# and harder as we try compiling at, say, top of the hour; we would
# eventually have to calculate time_t anyhow. Or 3) just grab two
# time_t's (no more overhead than grabbing two date(1)'s).
- compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME"
+ our_libs="-L$TEST_DIR -lv3test"
+ compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME $our_libs"
echo $compiler_invocation >> compile.out 2>&1
COMP_TIME_START=$($TIMER_COMMAND)
$compiler_invocation >> compile.out 2>&1
# printed by the executable will be lost and cannot be redirected,
# because we need to capture the output of 'time'. Bummer.
TIMEFORMAT='timemark %R'
- E_TIME_TEXT="$(exec 2>&1; \
- ulimit -d $MAX_MEM_USAGE; ulimit -v $MAX_MEM_USAGE; \
- time $LTEXE $EXENAME)"
+ E_TIME_TEXT="$(exec 2>&1; time $LTEXE $EXENAME)"
E_ABNORMAL_TERMINATION=$?
- E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')"
- # joining those two commands does not work due to quoting problems:
- #E_TIME="$(exec 2>&1; time $EXENAME | awk '{print $2}')"
- # this will work as a fallback on certain systems...?
- #E_TIME=$(exec 2>&1; time $EXENAME | cut -d ' ' -f 2)
if [ "$E_ABNORMAL_TERMINATION" -ne 0 ]; then
RESULT='-r'
+ E_TIME="0"
rm -f ./*core
# sometimes you want to save all core files for review:
#mv ./core $EXENAME.core
#mv ./core* $EXENAME.core
else
test_for_output
+ # XXX This doesn't always result in a number.
+ # E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')"
+ E_TIME="0"
fi
# sometimes you want to save all failing exe files for review:
- if [ "$RESULT" = "+" ]; then
+ if [ "$RESULT" = '+' ]; then
rm "$EXENAME"
fi
else
# the file did not compile/link.
printf "\n" >> $LOG_FILE
-# `cat compile.out >> $LOG_FILE`
-# rm compile.out
+ `cat compile.out >> $LOG_FILE`
+ rm compile.out
RESULT="-b"
TEXT="0"
DATA="0"
# grep can count faster than we can...
total_failures=`expr ${shared_fail} + ${static_fail}`
total_successes=`expr ${shared_pass} + ${static_pass}`
-resultstext="pass/fail results: ${shared_pass}/${shared_fail} shared + ${static_pass}/${static_fail} static = ${total_successes}/${total_failures} total"
+resultstext="pass/fail results: ${static_pass}/${static_fail} static + ${shared_pass}/${shared_fail} shared = ${total_successes}/${total_failures} total"
if [ $total_failures -eq 0 ]; then
resultstext="${resultstext}, WIN WIN"
fi