Add ability to warnings script to just check building (not setup or disasm) (#414)

* Add option to run warnings on just build

* Rename all to full

* Update tools/warnings_count/check_new_warnings.sh

Remove testing code.

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
This commit is contained in:
Derek Hensley 2021-11-19 07:52:32 -08:00 committed by GitHub
parent 9b51336f09
commit 9a424688b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,18 +32,30 @@ Check for new warnings created.
Optional arguments:
-h Display this message and exit.
-f Run full build process
-j N use N jobs (does not support plain -j because you shouldn't use it anyway)
"
}
jobs=1
full=
run="make clean
make uncompressed"
while getopts "hj:" opt
while getopts "hfj:" opt
do
case $opt in
h) show_help
exit 0
;;
f) full="true"
run="make distclean
make setup
make disasm
make all"
;;
j) j_option_arg="$OPTARG"
if [[ ! "${j_option_arg}" =~ ^[0-9]*$ ]]
then
@ -61,10 +73,7 @@ shift $(($OPTIND - 1))
# Confirm run with -j jobs
echo "This will run
make distclean
make setup
make disasm
make all
$run
using $jobs threads. This may take some time."
read -r -p "Is this okay? [Y/n]" response
response=${response,,} # tolower
@ -90,16 +99,20 @@ make_warnings () {
&& rm tools/warnings_count/warnings_temp.txt
}
if [[ $full ]]; then
make distclean
make_warnings setup setup
make_warnings disasm disasm
make_warnings all build
else
make clean
make_warnings uncompressed build
fi
echo "
$(tput ${TPUTTERM} setaf 3)(lots of make output ${TPUTTERM} here...)
$RST"
if [[ $full ]]; then
$COMPARE_WARNINGS setup
$COMPARE_WARNINGS disasm
fi
$COMPARE_WARNINGS build