chiark / gitweb /
Warnings: Track variable references in &-expansions
[subdirmk.git] / tests / check
index d5d282ffc4ba4816a36889b44f57516a7a7ceef7..1921877bb0ffc0798128ffb65a7c7bb4b8eae12c 100755 (executable)
@@ -1,34 +1,9 @@
-#!/bin/sh
-set -ex
+#!/bin/bash
+set -e
 
-cd example
+j=$(nproc 2>/dev/null || echo 1)
+j=$(( $j * 5 / 4 + 1 ))
 
-#----- in-tree build -----
-
-git clean -xdff
-./autogen.sh && ./configure
-make -j4 all check
-make -j4 clean
-make -j4 all check
-
-#----- out of tree build -----
-
-git clean -xdff
-mkdir build
-cd build
->>../src/for-test.sd.mk
->>../lib/for-test.mk.in
-.././autogen.sh && ../configure
-make -j4 all check
-
-#----- testing rebuild on input change -----
-
-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.'