Now normal tests must start with a letter. Ones starting with C
require OLD_SECNET_DIR. (Right now that must be both source and build
dir because it's tedious to have to distinguish them and pass both.)
Update comprehensive-test to (i) notice if the user forgot to set
this (ii) make it into an absolute path. Note that comprehensive-test
therefore has a different default to `make check': If OLD_SECNET_DIR
is not set, `make check' will do none of those tests, but
comprehensive-test will complain (and wants "" to disable those
tests).
We do not need to print this variable in our debugging output about
how we are running secnet (or how the user who specifies _DIVERT_=i
should run it).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
+case "${OLD_SECNET_DIR:?must be set, perhaps to the empty string}" in
+ ''|/*)
+ ;;
+ ../*)
+ OLD_SECNET_DIR="${PWD%/*}/${OLD_SECNET_DIR#../}"
+ echo >&2 "x OLD_SECNET_DIR=$OLD_SECNET_DIR"
+ ;;
+ *)
+ echo >&2 "relative non-.. OLD_SECNET_DIR $OLD_SECNET_DIR !";
+ exit 1
+ ;;
+esac
+
x () { echo >&2 "x $*"; "$@"; }
srcdir=$(pwd)
x () { echo >&2 "x $*"; "$@"; }
srcdir=$(pwd)
foreach k [array names env] {
switch -glob $k {
SECNET_STEST_DIVERT_* -
foreach k [array names env] {
switch -glob $k {
SECNET_STEST_DIVERT_* -
- SECNET_TEST_BUILDDIR { }
+ SECNET_TEST_BUILDDIR - OLD_SECNET_DIR { }
*SECNET* -
*PRELOAD* { puts -nonewline " $k=$env($k)" }
}
*SECNET* -
*PRELOAD* { puts -nonewline " $k=$env($k)" }
}
-&TESTSCRIPTS ?= $(wildcard &^/t-*[0-9a-z])
+&TESTSCRIPTS ?= $(wildcard &^/t-[a-z]*[0-9a-z])
+ifneq ($(OLD_SECNET_DIR),)
+&TESTSCRIPTS += $(wildcard &^/t-C*[0-9a-z])
+endif
+
&TESTNAMES := $(patsubst t-%,%,$(notdir $(&TESTSCRIPTS)))
&DEPS += $(src)/test-common.tcl
&TESTNAMES := $(patsubst t-%,%,$(notdir $(&TESTSCRIPTS)))
&DEPS += $(src)/test-common.tcl