diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/buildtests.sh | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh index 085b440b..360e7210 100755 --- a/scripts/buildtests.sh +++ b/scripts/buildtests.sh @@ -37,6 +37,7 @@ HELP() { echo " -t, --no-tidy Don't run any clang-tidy tests" echo " -b, --no-scan Don't run any scan-build tests" echo " -s, --no-splint Don't run any splint tests" + echo " -p, --no-codespell Don't run any codespell tests" echo " -n, --no-ninja Don't run any build tests with ninja" echo " -l, --no-clang-build Don't run any clang-build tests" echo " -g, --no-gcc-build Don't run any gcc-build tests" @@ -518,9 +519,31 @@ KRAZY() { echo "===== END KRAZY ======" } +#function CODESPELL +# runs a codespell test +CODESPELL() { + if ( test $runcodespell -ne 1 ) + then + echo "===== CODESPELL TEST DISABLED DUE TO COMMAND LINE OPTION =====" + return + fi + COMMAND_EXISTS "codespell" + echo "===== START CODESPELL =====" + cd $TOP + codespell --interactive=0 . 2>&1 | tee codespell.out + status=$? + if ( test $status -gt 0 ) + then + echo "Codespell warnings encountered. Exiting..." + exit 1 + fi + rm -f codespell.out + echo "===== END CODESPELL ======" +} + ##### END FUNCTIONS ##### -#TEMP=`getopt -o hmkctbsnlgadu --long help,no-cmake-compat,no-krazy,no-cppcheck,no-tidy,no-scan,no-splint,no-ninja,no-clang-build,no-gcc-build,no-asan-build,no-tsan-build,no-ubsan-build,no-memc-build -- "$@"` +#TEMP=`getopt -o hmkpctbsnlgadu --long help,no-cmake-compat,no-krazy,no-codespell,no-cppcheck,no-tidy,no-scan,no-splint,no-ninja,no-clang-build,no-gcc-build,no-asan-build,no-tsan-build,no-ubsan-build,no-memc-build -- "$@"` TEMP=`getopt hmkctbsnlgadux $*` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi # Note the quotes around `$TEMP': they are essential! @@ -528,6 +551,7 @@ eval set -- "$TEMP" cmakecompat=1 runkrazy=1 +runcodespell=1 runcppcheck=1 runtidy=1 runscan=1 @@ -544,6 +568,7 @@ while true; do -h|--help) HELP; exit 1;; -m|--no-cmake-compat) cmakecompat=0; shift;; -k|--no-krazy) runkrazy=0; shift;; + -p|--no-codespell) runcodespell=0; shift;; -c|--no-cppcheck) runcppcheck=0; shift;; -t|--no-tidy) runtidy=0; shift;; -b|--no-scan) runscan=0; shift;; @@ -608,6 +633,7 @@ GLIBOPTS="-DCMAKE_BUILD_TYPE=Debug -DGOBJECT_INTROSPECTION=True -DUSE_BUILTIN_TZ #Static code checkers KRAZY +CODESPELL SPLINT test2 "$CMAKEOPTS" SPLINT test2builtin "$TZCMAKEOPTS" CPPCHECK test2 "$CMAKEOPTS" |