diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-22 17:31:41 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-22 22:20:29 -0400 |
commit | 1bd9ca4cce9c9de646a878eea617dcac5fb67b9e (patch) | |
tree | 9488fdae050a2bc62cac5c51587ff4897c1c9356 | |
parent | edc047fa3167fd89efde193a137e94eac35f93ac (diff) | |
download | stasis-1bd9ca4cce9c9de646a878eea617dcac5fb67b9e.tar.gz |
Encapsulate the tox.ini generation.
* This avoids telling the user we're about to modify the tox.ini if there's no real work to be done.
-rw-r--r-- | src/deliverable.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/deliverable.c b/src/deliverable.c index 12be732..e00d615 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -1413,15 +1413,15 @@ void delivery_tests_run(struct Delivery *ctx) { // Apply workaround for tox positional arguments char *toxconf = NULL; if (!access("tox.ini", F_OK)) { - msg(OMC_MSG_L3, "Fixing tox positional arguments\n"); - - fix_tox_conf("tox.ini", &toxconf); - if (!globals.workaround.tox_posargs) { - globals.workaround.tox_posargs = calloc(PATH_MAX, sizeof(*globals.workaround.tox_posargs)); - } else { - memset(globals.workaround.tox_posargs, 0, PATH_MAX); + if (!fix_tox_conf("tox.ini", &toxconf)) { + msg(OMC_MSG_L3, "Fixing tox positional arguments\n"); + if (!globals.workaround.tox_posargs) { + globals.workaround.tox_posargs = calloc(PATH_MAX, sizeof(*globals.workaround.tox_posargs)); + } else { + memset(globals.workaround.tox_posargs, 0, PATH_MAX); + } + snprintf(globals.workaround.tox_posargs, PATH_MAX - 1, "-c %s --root .", toxconf); } - snprintf(globals.workaround.tox_posargs, PATH_MAX - 1, "-c %s --root .", toxconf); } // enable trace mode before executing each test script |