From 1125dad3b50dbc0fd6540760e0db4b24dd9051e2 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 24 Jun 2024 10:57:01 -0400 Subject: Implements conda reactivation template string * {{ workaround.conda_reactivate }} * This is useful to call after installing any conda packages within a test.script --- src/delivery.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/delivery.c') diff --git a/src/delivery.c b/src/delivery.c index 5c507bf..2064bd3 100644 --- a/src/delivery.c +++ b/src/delivery.c @@ -1687,6 +1687,13 @@ void delivery_tests_run(struct Delivery *ctx) { struct Process proc; memset(&proc, 0, sizeof(proc)); + if (!globals.workaround.conda_reactivate) { + globals.workaround.conda_reactivate = calloc(PATH_MAX, sizeof(*globals.workaround.conda_reactivate)); + } else { + memset(globals.workaround.conda_reactivate, 0, PATH_MAX); + } + snprintf(globals.workaround.conda_reactivate, PATH_MAX - 1, "\nset +x\neval `conda shell.posix reactivate`\nset -x\n"); + if (!ctx->tests[0].name) { msg(STASIS_MSG_WARN | STASIS_MSG_L2, "no tests are defined!\n"); } else { -- cgit