summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-10-31 03:23:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-10-31 03:23:36 (GMT)
commit013de08d96cf9494f787dfb60fe1c29805e30bf0 (patch)
tree55a452b9e1344ea0779bbcdf3ccf898a956a3ec0 /bin
parentcb3203d0741f6efeef1ad89108f8dfd8430f79c7 (diff)
downloadhdf5-013de08d96cf9494f787dfb60fe1c29805e30bf0.zip
hdf5-013de08d96cf9494f787dfb60fe1c29805e30bf0.tar.gz
hdf5-013de08d96cf9494f787dfb60fe1c29805e30bf0.tar.bz2
[svn-r11633] Purpose:
Bug fix. Description: chkcopyright has been changed to return an exit code whether it passes or not. Changed the detection accordingly. Platforms tested: heping.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/runtest23
1 files changed, 15 insertions, 8 deletions
diff --git a/bin/runtest b/bin/runtest
index f502a27..f595ec5 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -755,9 +755,7 @@ if [ -z "$NOCVS" ]; then
# Check Copyright notice
# ======================
PRINT Checking Copyrights notices ...
- (cd $SNAPYARD/current; bin/chkcopyright) > $TMPFILE 2>&1
- if [ ! -s $TMPFILE ]; then
- # No output means all is well.
+ if (cd $SNAPYARD/current; bin/chkcopyright) > $TMPFILE 2>&1 ; then
echo Passed.
else
# Save the output and report some of it.
@@ -766,14 +764,23 @@ if [ -z "$NOCVS" ]; then
# Need fixes/cleanup later.
echo "Failed. See detail in another report mail"
cp $TMPFILE $COPYRIGHT_ERR
- (
- nlines=300
+ nheadlines=300
+ ntaillines=5 # Number of lines in report summary.
+ (
echo =========================
- echo "Copyright checking failed. Showing first $nlines lines of output."
+ echo "Copyright checking failed. Showing first $nheadlines lines of output."
echo "Complete output is in file $COPYRIGHT_ERR"
echo =========================
- head -$nlines $COPYRIGHT_ERR
- echo ...
+ nreportlines=`wc -l < $COPYRIGHT_ERR`
+ if [ $nreportlines -le `expr $nheadlines + $ntaillines` ]; then
+ # Just print the whole file.
+ cat $COPYRIGHT_ERR
+ else
+ # Show the first $nheadlines plus report summary
+ head -$nheadlines $COPYRIGHT_ERR
+ echo ...
+ tail -$ntaillines $COPYRIGHT_ERR
+ fi
) | Mail -s "${H5VERSION} Copyrights check Failed" hdf5lib
fi
rm $TMPFILE