chiark / gitweb /
README: Refer to example/
[subdirmk.git] / tests / check
index 7465c2c88e1220ea4b40a9c3c2965c422311c1fc..1921877bb0ffc0798128ffb65a7c7bb4b8eae12c 100755 (executable)
@@ -1,22 +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
-.././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 ok.
+x () { echo "$@"; "$@"; }
+x ${MAKE-make} -f tests/tests.mk -j$j
+echo 'ok.'