diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-24 10:57:01 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-24 10:57:01 -0400 |
| commit | 1125dad3b50dbc0fd6540760e0db4b24dd9051e2 (patch) | |
| tree | d9016c3fce01b5e0563f5609e14adff2894679b5 /src/delivery.c | |
| parent | 3b8e8078408feb49cd41272935f3df2e35faa092 (diff) | |
| download | stasis-1125dad3b50dbc0fd6540760e0db4b24dd9051e2.tar.gz | |
Implements conda reactivation template string
* {{ workaround.conda_reactivate }}
* This is useful to call after installing any conda packages within a test.script
Diffstat (limited to 'src/delivery.c')
| -rw-r--r-- | src/delivery.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |
