diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-02-13 00:08:33 -0500 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-02-13 00:08:33 -0500 | 
| commit | cc76f3972527cfc43986561f4bce9a7f24f40921 (patch) | |
| tree | d90b2d46f188e3c043aedb18f43ce886840df999 /src | |
| parent | ca1714f2a47468217905264f5edaf5b86449a484 (diff) | |
| download | stasis-cc76f3972527cfc43986561f4bce9a7f24f40921.tar.gz | |
Render template strings in test shell script
Diffstat (limited to 'src')
| -rw-r--r-- | src/deliverable.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/src/deliverable.c b/src/deliverable.c index 68f4711..593b0b5 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -1292,8 +1292,10 @@ void delivery_tests_run(struct Delivery *ctx) {                  // enable trace mode before executing each test script                  memset(cmd, 0, sizeof(cmd));                  sprintf(cmd, "set -x ; %s", ctx->tests[i].script); -                status = shell(&proc, cmd); + +                status = shell(&proc, tpl_render(cmd));                  if (status) { +                    msg(OMC_MSG_ERROR, "Script failure: %s\n%s\n\nExit code: %d\n", ctx->tests[i].name, ctx->tests[i].script, status);                      COE_CHECK_ABORT(!globals.continue_on_error, "Test failure")                  }                  popd(); | 
