[master] d208f376e vtest: make the basename of the test directory available as vtcid
Nils Goroll
nils.goroll at uplex.de
Fri Jun 23 10:49:06 UTC 2023
commit d208f376e6c706a962686a20413b814efccd24d0
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Jun 23 12:41:01 2023 +0200
vtest: make the basename of the test directory available as vtcid
to have available a unique string for concurrently running tests
which is not a path.
diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 12647c6ee..55080ac27 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -600,6 +600,11 @@ exec_file(const char *fn, const char *script, const char *tmpdir,
/* Move into our tmpdir */
AZ(chdir(tmpdir));
macro_def(vltop, NULL, "tmpdir", "%s", tmpdir);
+ p = strrchr(tmpdir, '/');
+ AN(p);
+ p++;
+ AN(*p);
+ macro_def(vltop, NULL, "vtcid", "%s", p);
/* Drop file to tell what was going on here */
f = fopen("INFO", "w");
More information about the varnish-commit
mailing list