diff --git a/tests/static-check/run_checks.sh b/tests/static-check/run_checks.sh index f5bc3319a3..b7e7c39325 100755 --- a/tests/static-check/run_checks.sh +++ b/tests/static-check/run_checks.sh @@ -4,6 +4,9 @@ set -x n_procs="$(getconf _NPROCESSORS_ONLN)" use_procs=$((n_procs/2)) +if [ "$use_procs" -lt "0" ]; then + use_procs=1 +fi function check_with_gcc() { # previous runs may have cached configuration based on a different CC diff --git a/tests/valgrind-check/valgrind.sh b/tests/valgrind-check/valgrind.sh index 34716fec64..62d02a7fb1 100644 --- a/tests/valgrind-check/valgrind.sh +++ b/tests/valgrind-check/valgrind.sh @@ -124,7 +124,7 @@ print_ps # cf-serverd running under valgrind can be really slow to start, let's give it # some time before we move on and potentially hit the wall if it's actually # malfunctioning -tries=12 # max 2 minutes +tries=24 # max 4 minutes while /var/cfengine/bin/cf-net -H $BOOTSTRAP_IP connect | grep Failed; do tries=$((tries - 1)) if [ $tries -le 0 ]; then