From 64b77ab4933583f59035b37aa3bf4ff5eb541015 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 26 Mar 2026 11:28:26 +0100 Subject: [PATCH] tests: Check for binary before starting functional tests Signed-off-by: Michael Vetter --- tests/functionaltests/proftest.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functionaltests/proftest.c b/tests/functionaltests/proftest.c index 62384e4b..0187360f 100644 --- a/tests/functionaltests/proftest.c +++ b/tests/functionaltests/proftest.c @@ -271,6 +271,13 @@ prof_start(void) int init_prof_test(void** state) { + // Check if profanity binary exists and is executable + if (access("./build_run/profanity", X_OK) != 0 && access("./profanity", X_OK) != 0) { + fprintf(stderr, "ERROR: Profanity binary not found or not executable.\n"); + fprintf(stderr, "Ensure you have built the project.\n"); + return -1; + } + const char* cfg = getenv("XDG_CONFIG_HOME"); const char* dat = getenv("XDG_DATA_HOME"); config_orig = cfg ? g_strdup(cfg) : NULL;