From: Baptiste Daroussin Date: Tue, 27 May 2025 09:35:47 +0000 (+0200) Subject: test: restore usage of top_srcdir which was actually setup in kyua.conf X-Git-Tag: RELEASE_1.5.2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49f2bd13f44d112ded78df9bb688777f11ecf45e;p=thirdparty%2Fmlmmj.git 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 --- 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"); }