chiark / gitweb /
stest: Honour new sitesconf_hook
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 3 Dec 2019 23:26:20 +0000 (23:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:53 +0000 (21:56 +0000)
This lets individual tests fiddle with the sites.conf.

By default, we provide a proc that does nothing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
stest/common.tcl

index fb98c2ecf5edfb11051572f0031792912c398523..cbf8fc1fae8902a7c60bc945bddfd30d31d3441c 100644 (file)
@@ -28,6 +28,8 @@ set extra(outside) {}
 set privkey(inside) test-example/inside.privkeys/
 set privkey(outside) test-example/outside.privkeys/
 
+proc sitesconf_hook {l} { return $l }
+
 proc mkconf {location site} {
     global tmp
     global builddir
@@ -125,6 +127,7 @@ exec cat
     set f [open $sitesconf r]
     while {[gets $f l] >= 0} {
        regsub {\"[^\"]*test-example/pubkeys/} $l "\"$pubkeys/" l
+       set l [sitesconf_hook $l]
        append cfg $l "\n"
     }
     set sites [read $f]