diff --git a/build.sh b/build.sh index ca37509..fd41d40 100644 --- a/build.sh +++ b/build.sh @@ -6,6 +6,12 @@ root=$(CDPATH= cd -- "$(dirname "$0")" && pwd) src="$root/work/src" prefix=$(cygpath -m "$root/work/prefix") +if [ "${1:-}" = check ]; then + export PATH="$(cygpath -u "$prefix")/bin:${PATH}" + make -C "$src" check + exit 0 +fi + if [ ! -f "$src/configure" ]; then echo "no sources in work/src; run: .\\ck.ps1 fetch-sources" >&2 exit 1 diff --git a/ck.ps1 b/ck.ps1 index 32add5b..5efb55a 100644 --- a/ck.ps1 +++ b/ck.ps1 @@ -176,7 +176,7 @@ function Invoke-Build { } function Invoke-Test { - Invoke-Ucrt 'export PATH="$(cygpath -u "$PWD/work/prefix")/bin:$PATH"; make -C work/src check' + Invoke-Ucrt './build.sh check' } function Get-Revision {