[master] dca6658ae varnishtest: Introduce a ${varnishd_args} macro
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Apr 17 20:12:07 UTC 2023
commit dca6658ae75fd7dbca6e0696a3f554c0f74aced0
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Apr 14 15:29:11 2023 +0200
varnishtest: Introduce a ${varnishd_args} macro
Refs #3897
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index f763fcce7..c8b6bba15 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -430,6 +430,10 @@ varnish_launch(struct varnish *v)
if (vmod_path != NULL)
VSB_printf(vsb, " -p vmod_path=%s", vmod_path);
VSB_printf(vsb, " %s", VSB_data(v->args));
+ if (macro_isdef(NULL, "varnishd_args")) {
+ VSB_putc(vsb, ' ');
+ macro_cat(v->vl, vsb, "varnishd_args", NULL);
+ }
AZ(VSB_finish(vsb));
vtc_log(v->vl, 3, "CMD: %s", VSB_data(vsb));
vsb1 = macro_expand(v->vl, VSB_data(vsb));
@@ -1068,6 +1072,12 @@ vsl_catchup(struct varnish *v)
* \-arg STRING
* Pass an argument to varnishd, for example "-h simple_list".
*
+ * If the ${varnishd_args} macro is defined, it is expanded and
+ * appended to the varnishd command line, before the command line
+ * itself is expanded. This enables tweaks to the varnishd command
+ * line without editing test cases. This macro can be defined using
+ * the ``-D`` option for varnishtest.
+ *
* \-vcl STRING
* Specify the VCL to load on this Varnish instance. You'll probably
* want to use multi-lines strings for this ({...}).
More information about the varnish-commit
mailing list