Changeset a4eb3ba2 in mainline for tools/ccheck.sh


Ignore:
Timestamp:
2018-05-22T14:21:15Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
86b70c6
Parents:
904b1bc
git-author:
Jiri Svoboda <jiri@…> (2018-05-21 18:20:15)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-22 14:21:15)
Message:

Fail if ccheck issues are found. Make sure we always use the right ccheck revision.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ccheck.sh

    r904b1bc ra4eb3ba2  
    3939snorepcnt=0
    4040fcnt=0
    41 exitfile="$(mktemp)"
    42 echo 0 >"$exitfile"
    4341
    4442find abi kernel boot uspace -type f -regex '^.*\.[ch]$' | (
     
    5048                if [ -s "$outfile" ] ; then
    5149                        srepcnt=$((srepcnt + 1))
    52                         #cat "$outfile"
    53                         echo "$fname has issues"
     50                        cat "$outfile"
    5451                else
    5552                        snorepcnt=$((snorepcnt + 1))
     
    6461done
    6562
    66 echo "Checked files with issues: $srepcnt"
    67 echo "Checked files without issues: $snorepcnt"
    68 echo "Not checked files: $fcnt"
     63if [ $srepcnt == 0 -a $fcnt == 0 ] ; then
     64        echo "Ccheck passed."
     65else
     66        echo "Ccheck failed."
     67        echo "Checked files with issues: $srepcnt"
     68        echo "Checked files without issues: $snorepcnt"
     69        echo "Files with parse errors: $fcnt"
     70        exit 1
     71fi
    6972)
    70 
    71 exitcode=$(cat "$exitfile")
    72 rm -rf "$exitfile"
    73 
    74 exit $exitcode
Note: See TracChangeset for help on using the changeset viewer.