#!/bin/bash set -e . tests/lib-core . tests/lib-restricts mode=$1 test-begin- () { whynots='' } restriction- () { set +e whynot=$(t-restriction-$r) rc=$? whynot="${whynot// / / }" set -e case "$rc.$whynot" in 0.) ;; 1.?*) whynots="$whynots${whynots:+; }$whynot" ;; *) fail "restriction $r for $t gave $rc $whynot !" esac } dependencies- () { : } test-done- () { case "$whynots" in '') echo $t ;; ?*) echo >&2 "SKIP $t $whynots" ;; esac } finish- () { : } test-begin-gencontrol () { restrictions='' dependencies='' } restriction-gencontrol () { restrictions+=" $r" } dependencies-gencontrol () { dependencies+=", $deps" } test-done-gencontrol () { stanza=$( add_Depends="$dependencies" \ perl