Commit 3f49b842 by Benjamin Kosnik

mkcheck.in: Rely on exit status instead of the presence of a core file.


2000-04-28  Loren J. Rittle  <ljrittle@acm.org>

        * mkcheck.in: Rely on exit status instead of the presence of a
        core file.  Added comments on how/where to save core and exe
        files.  Move shell wildcards outside quotes and fix core path.

From-SVN: r33550
parent 4d0482f6
...@@ -2,6 +2,17 @@ ...@@ -2,6 +2,17 @@
* docs/download.html: Add link to list of mirror sites. * docs/download.html: Add link to list of mirror sites.
2000-04-28 Loren J. Rittle <ljrittle@acm.org>
* mkcheck.in: Rely on exit status instead of the presence of a
core file. Added comments on how/where to save core and exe
files. Move shell wildcards outside quotes and fix core path.
2000-04-27 scott snyder <snyder@fnal.gov>
* src/misc-inst.cc: Explicitly instantiate ifstream and ofstream
classes.
2000-04-26 Nathan C. Myers <ncm@cantrip.org> 2000-04-26 Nathan C. Myers <ncm@cantrip.org>
* bits/basic_string.h: include <bits/atomicity.h> instead * bits/basic_string.h: include <bits/atomicity.h> instead
......
...@@ -124,8 +124,10 @@ if [ ! -x "$TEST_DIR/printnow" ]; then ...@@ -124,8 +124,10 @@ if [ ! -x "$TEST_DIR/printnow" ]; then
fi fi
# Remove old executables. # Remove old executables.
rm -rf "$TEST_DIR/*exe" rm -rf "$TEST_DIR"/*exe
rm -rf "$TEST_DIR/core" "$TEST_DIR/*core"
# Remove old core files (which now get left in cwd, not $TEST_DIR).
rm -rf ./*core
# Copy over the data files for filebufs in read-only mode # Copy over the data files for filebufs in read-only mode
cp $SRC_DIR/testsuite/27_io/*.txt $TEST_DIR cp $SRC_DIR/testsuite/27_io/*.txt $TEST_DIR
...@@ -202,16 +204,21 @@ do ...@@ -202,16 +204,21 @@ do
# Actually run the executable and time it . . . # Actually run the executable and time it . . .
TIMEFORMAT='timemark %R' TIMEFORMAT='timemark %R'
E_TIME_TEXT="$(exec 2>&1; time $ST_NAME)" E_TIME_TEXT="$(exec 2>&1; time $ST_NAME)"
E_ABNORMAL_TERMINATION=$?
E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')" E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')"
# joining those two commands does not work due to quoting problems: # joining those two commands does not work due to quoting problems:
#E_TIME="$(exec 2>&1; time $ST_NAME | awk '{print $2}')" #E_TIME="$(exec 2>&1; time $ST_NAME | awk '{print $2}')"
# this will work as a fallback on certain systems...? # this will work as a fallback on certain systems...?
#E_TIME=$(exec 2>&1; time $ST_NAME | cut -d ' ' -f 2) #E_TIME=$(exec 2>&1; time $ST_NAME | cut -d ' ' -f 2)
if [ -f core ]; then if [ "$E_ABNORMAL_TERMINATION" -ne 0 ]; then
ST_EXEC='-' ST_EXEC='-'
echo "st_fail" | awk '{printf("\t%s\n", $1)}' echo "st_fail" | awk '{printf("\t%s\n", $1)}'
rm core rm -f ./*core
# sometimes you want to save all core files for review:
#mv ./core $ST_NAME.core
# sometimes the OS names core files as programname.core:
#mv ./*core $ST_NAME.core
else else
# XXX this should probably be a function? # XXX this should probably be a function?
...@@ -258,13 +265,17 @@ do ...@@ -258,13 +265,17 @@ do
rm $DIFF_FILE rm $DIFF_FILE
done done
else else
# the file does no output, and didn't core, so # the file does no output, and didn't abnormally
# assume passed. # terminate, so assume passed.
ST_EXEC="+" ST_EXEC="+"
echo "st_pass" | awk '{printf("\t%s\t", $1)}' echo "st_pass" | awk '{printf("\t%s\t", $1)}'
fi fi
fi fi
rm "$ST_NAME" rm "$ST_NAME"
# sometimes you want to save all failing exe files for review:
#if [ "$ST_EXEC" = "+" ]; then
# rm "$ST_NAME"
#fi
else else
# the file did not compile. Write out compilation info to the log file. # the file did not compile. Write out compilation info to the log file.
echo "$CXX $CXX_FLAG $ST_FLAG $INC_PATH $LIB_PATH $CNAME -o $ST_NAME" \ echo "$CXX $CXX_FLAG $ST_FLAG $INC_PATH $LIB_PATH $CNAME -o $ST_NAME" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment