From 49f2bd13f44d112ded78df9bb688777f11ecf45e Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Tue, 27 May 2025 11:35:47 +0200 Subject: [PATCH] test: restore usage of top_srcdir which was actually setup in kyua.conf Add a test of the presence of the variable, it fails if the kyua.conf path is not provided to the kyua call --- tests/mlmmj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/mlmmj.c b/tests/mlmmj.c index 5080cb84..0444f2f5 100644 --- a/tests/mlmmj.c +++ b/tests/mlmmj.c @@ -1893,8 +1893,9 @@ setup_listtext(const atf_tc_t *tc) { char *dir = NULL; rmdir("list/text"); - xasprintf(&dir, "%s/../listtexts/en", - atf_tc_get_config_var(tc, "srcdir")); + ATF_REQUIRE_MSG(atf_tc_has_config_var(tc, "top_srcdir"), "missing configuration variable 'top_srcdir'"); + xasprintf(&dir, "%s/listtexts/en", + atf_tc_get_config_var(tc, "top_srcdir")); symlink(dir, "list/text"); } -- 2.47.3