tests: Prefer tf_printf.
Some checks failed
Build Tilde Friends / Build-All (push) Failing after 3m33s

This commit is contained in:
Cory McWilliams 2024-12-17 20:41:27 -05:00
parent 8df121148d
commit a9aa928629
2 changed files with 5 additions and 7 deletions

View File

@ -902,8 +902,7 @@ static void _write_file(const char* path, const char* contents)
FILE* file = fopen(path, "w");
if (!file)
{
printf("Unable to write %s: %s.\n", path, strerror(errno));
fflush(stdout);
tf_printf("Unable to write %s: %s.\n", path, strerror(errno));
abort();
}
fputs(contents, file);
@ -933,7 +932,7 @@ void tf_ssb_test_encrypt(const tf_test_options_t* options)
int result = system(command);
(void)result;
assert(WIFEXITED(result));
printf("returned %d\n", WEXITSTATUS(result));
tf_printf("returned %d\n", WEXITSTATUS(result));
assert(WEXITSTATUS(result) == 0);
}
@ -1028,13 +1027,13 @@ void tf_ssb_test_publish(const tf_test_options_t* options)
int result = system(command);
(void)result;
assert(WIFEXITED(result));
printf("returned %d\n", WEXITSTATUS(result));
tf_printf("returned %d\n", WEXITSTATUS(result));
assert(WEXITSTATUS(result) == 0);
snprintf(command, sizeof(command), "%s publish -d out/test_db0.sqlite -u :admin -i %s -c '{\"type\": \"post\", \"text\": \"Two.\"}'", executable, id);
result = system(command);
assert(WIFEXITED(result));
printf("returned %d\n", WEXITSTATUS(result));
tf_printf("returned %d\n", WEXITSTATUS(result));
assert(WEXITSTATUS(result) == 0);
uv_run(&loop, UV_RUN_DEFAULT);

View File

@ -40,8 +40,7 @@ static void _write_file(const char* path, const char* contents)
FILE* file = fopen(path, "w");
if (!file)
{
printf("Unable to write %s: %s.\n", path, strerror(errno));
fflush(stdout);
tf_printf("Unable to write %s: %s.\n", path, strerror(errno));
abort();
}
fputs(contents, file);