diff options
| author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2026-01-20 08:32:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-20 08:32:35 -0500 |
| commit | 723514c5fa735b34fea983790cf3b3609a198fb7 (patch) | |
| tree | 7a6a0cb5fc8d48e135add066e6491a0ab7ac3658 /src/lib/delivery/delivery_populate.c | |
| parent | 81579091193962bdeefad38085fa5933c0971935 (diff) | |
| parent | 9c452eedaa874773d0b302648373d670a3887a79 (diff) | |
| download | stasis-723514c5fa735b34fea983790cf3b3609a198fb7.tar.gz | |
Merge pull request #121 from jhunkeler/timeout-in-test-block
Timeout in test block
Diffstat (limited to 'src/lib/delivery/delivery_populate.c')
| -rw-r--r-- | src/lib/delivery/delivery_populate.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/delivery/delivery_populate.c b/src/lib/delivery/delivery_populate.c index 28b2480..15ab6bd 100644 --- a/src/lib/delivery/delivery_populate.c +++ b/src/lib/delivery/delivery_populate.c @@ -259,6 +259,18 @@ int populate_delivery_ini(struct Delivery *ctx, int render_mode) { test->repository_remove_tags = ini_getval_strlist(ini, section_name, "repository_remove_tags", LINE_SEP, render_mode, &err); test->build_recipe = ini_getval_str(ini, section_name, "build_recipe", render_mode, &err); test->runtime.environ = ini_getval_strlist(ini, section_name, "runtime", LINE_SEP, render_mode, &err); + const char *timeout_str = ini_getval_str(ini, section_name, "timeout", render_mode, &err); + if (timeout_str) { + test->timeout = str_to_timeout((char *) timeout_str); + if (test->timeout == STR_TO_TIMEOUT_INVALID_TIME_SCALE) { + SYSERROR("In 'test:%s', invalid time scale format: %s. Use n[hms].", test->name, timeout_str); + return 1; + } + if (test->timeout == STR_TO_TIMEOUT_NEGATIVE) { + SYSERROR("In 'test:%s', timeout cannot be negative: %s", test->name, timeout_str); + return 1; + } + } z++; } } |
