Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a4eb3ba2 in mainline


Ignore:
Timestamp:
2018-05-22T14:21:15Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r904b1bc ra4eb3ba2  
    8484
    8585ccheck: $(CCHECK)
     86        cd tools && ./build-ccheck.sh
    8687        tools/ccheck.sh
    8788
    8889ccheck-fix: $(CCHECK)
     90        cd tools && ./build-ccheck.sh
    8991        tools/ccheck.sh --fix
    9092
    9193space:
    9294        tools/srepl '[ \t]\+$$' ''
    93 
    94 $(CCHECK):
    95         cd tools && ./build-ccheck.sh
    9695
    9796doxy:
  • tools/build-ccheck.sh

    r904b1bc ra4eb3ba2  
    2828#
    2929
    30 git clone https://github.com/jxsvoboda/sycek sycek
     30SYCEK_GIT="https://github.com/jxsvoboda/sycek sycek"
     31SYCEK_REV="722f6c377875ea9e471d77e7486c8d06f0a73ff7"
     32
     33if [ ! -d sycek ]; then
     34        git clone https://github.com/jxsvoboda/sycek sycek
     35fi
     36
    3137cd sycek
    32 make
     38
     39# Make sure we have the required revision
     40echo "Making sure Sycek is up to date..."
     41git checkout "$SYCEK_REV" 2>/dev/null
     42rc=$?
     43if [ $rc != 0 ]; then
     44        echo "Pulling from Sycek repo..."
     45        git checkout master
     46        git pull
     47        git checkout "$SYCEK_REV" 2>/dev/null
     48        rc=$?
     49        if [ $rc != 0 ]; then
     50                echo "Error checking out Sycek rev $SYCEK_REV"
     51                exit 1
     52        fi
     53
     54        make clean || exit 1
     55        make || exit 1
     56else
     57        make >/dev/null || exit 1
     58fi
  • 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.