aboutsummaryrefslogtreecommitdiff
path: root/tests/test_conda.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-05-11 15:47:09 -0400
committerGitHub <noreply@github.com>2026-05-11 15:47:09 -0400
commit4649a889a916aa377ebd3ca8f3daa9ac703baa34 (patch)
tree993173328bdf96eb469c2412241f202cdbc5cf53 /tests/test_conda.c
parent58d3ca17dcd3f8b3aeb50b8e4f24afc76d33ff26 (diff)
parentb7a60c5bed989a52a53b8b697203f55367f55a89 (diff)
downloadstasis-4649a889a916aa377ebd3ca8f3daa9ac703baa34.tar.gz
Merge pull request #143 from jhunkeler/use-sys-macros
Replace msg, perror, and fprintf with SYS message macros
Diffstat (limited to 'tests/test_conda.c')
-rw-r--r--tests/test_conda.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_conda.c b/tests/test_conda.c
index e32c9f2..f6ee2f8 100644
--- a/tests/test_conda.c
+++ b/tests/test_conda.c
@@ -146,11 +146,11 @@ void test_pip_index_provides() {
int result = pkg_index_provides(PKG_USE_PIP, test->pindex, test->name, ".");
STASIS_ASSERT(result == test->expected, "Unexpected result");
if (PKG_INDEX_PROVIDES_FAILED(result)) {
- fprintf(stderr, "error: %s\n", pkg_index_provides_strerror(result));
+ SYSERROR("%s", pkg_index_provides_strerror(result));
} else if (result == PKG_NOT_FOUND) {
- fprintf(stderr, "package not found: '%s'\n", test->name);
+ SYSERROR("package not found: '%s'", test->name);
} else {
- printf("package found: '%s'\n", test->name);
+ SYSDEBUG("package found: '%s'", test->name);
}
}
}
@@ -208,7 +208,7 @@ int main(int argc, char *argv[]) {
char ws[] = "workspace_XXXXXX";
if (!mkdtemp(ws)) {
- perror("mkdtemp");
+ SYSERROR("unable to mkdtemp: %s", strerror(errno));
exit(1);
}
getcwd(cwd_start, sizeof(cwd_start) - 1);