check-all.sh

Fri, 19 Dec 2025 14:06:21 +0100

author
Mike Becker <universe@uap-core.de>
date
Fri, 19 Dec 2025 14:06:21 +0100
changeset 1629
ac24ad6c8595
parent 1627
d643fec1b2d5
child 1630
17ae70728139
permissions
-rwxr-xr-x

let check-all.sh restore the build tree when it's done

#!/bin/sh

# backup config
cp config.mk config.mk.bak

perform_check()
{
  make clean > /dev/null
  if ! make check -j`nproc` > /dev/null ; then
    echo "fail."
  else
    echo "ok."
  fi
}

perform_check_cxx()
{
  make clean > /dev/null
  # we cannot mute the warnings, so throw away everything
  if ! make check-cxx -j`nproc` > /dev/null 2> /dev/null ; then
    echo "fail."
  else
    echo "ok."
  fi
}

for cc in clang gcc; do
  CC=$cc ./configure --debug > /dev/null
  printf "Check $cc... "
  perform_check
  printf "Check $cc (c++)... "
  perform_check_cxx
done

printf "Check w/o szmul builtin... "
./configure --debug --disable-szmul-builtin > /dev/null
perform_check
printf "Check w/o szmul builtin (c++)... "
perform_check_cxx

printf "Check release config... "
./configure --release > /dev/null
perform_check

printf "Check gcc C23... "
CC=gcc CFLAGS=-std=c23 ./configure --debug > /dev/null
perform_check

# clean build files and restore config
make clean > /dev/null
mv config.mk.bak config.mk
make check -j`nproc`

mercurial