Skip to content

Commit

Permalink
test: fix test run from an external build
Browse files Browse the repository at this point in the history
Makefile.autosetup is not present in the build tree, so when
we get the "srcdir" config from atf Makefile.autosetup is not present
because it points at the buildir.
  • Loading branch information
bapt committed Nov 27, 2024
1 parent 0a8a2d0 commit 4f22794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/lib/pkg_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ATF_TC_BODY(analyse_elf, tc)
ATF_REQUIRE_STREQ(tll_front(p->shlibs_provided), "libtestfbsd.so.1");
free(binpath);

xasprintf(&binpath, "%s/Makefile.autosetup", atf_tc_get_config_var(tc, "srcdir"));
xasprintf(&binpath, "%s/Makefile", atf_tc_get_config_var(tc, "srcdir"));
ATF_REQUIRE_EQ(pkg_analyse_elf(false, p, binpath), EPKG_END);
ATF_REQUIRE_EQ(tll_length(p->shlibs_provided), 1);
free(binpath);
Expand Down

0 comments on commit 4f22794

Please sign in to comment.