X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tests%2Fcheck;h=1921877bb0ffc0798128ffb65a7c7bb4b8eae12c;hb=3177fb7abb48479332cce56b02b6407968fb2d27;hp=f0914dd597e456fd0a14287f1bb73d6834bcd44a;hpb=4c223d7528029763cb4afd0682fa950d83f50f61;p=subdirmk.git diff --git a/tests/check b/tests/check index f0914dd..1921877 100755 --- a/tests/check +++ b/tests/check @@ -1,27 +1,9 @@ -#!/bin/sh -set -ex +#!/bin/bash +set -e -cd example -git clean -xdff -./autogen.sh && ./configure -make -j4 all check -make -j4 clean -make -j4 all check +j=$(nproc 2>/dev/null || echo 1) +j=$(( $j * 5 / 4 + 1 )) -git clean -xdff -mkdir build -cd build ->>../src/for-test.sd.mk ->>../lib/for-test.mk.in -.././autogen.sh && ../configure -make -j4 all check - -echo '# for-check 1' >>../src/for-test.sd.mk -make -j4 -grep '^# for-check 1' src/Subdir.mk || false - -echo '# for-check 2' >>../lib/for-test.mk.in -make -j4 -grep '^# for-check 2' lib/for-test.mk || false - -echo ok. +x () { echo "$@"; "$@"; } +x ${MAKE-make} -f tests/tests.mk -j$j +echo 'ok.'