Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion test/tap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,24 @@ tests_with_deps: tap test_deps
cd tests_with_deps && CC=${CC} CXX=${CXX} ${MAKE} $(MAKECMDGOALS)


# `tap test_deps` is NOT optional here, even though nothing under tests/unit is
# built by those targets. The unit tests link -lcurl with -L$(TAP_LDIR), i.e.
# test/tap/tap, and the `tap` recipe populates that directory by copying the
# vendored library into it:
#
# libcurl$(SHLIB_EXT): $(DEPS_PATH)/curl/curl/lib/.libs/libcurl$(SHLIB_EXT)
# cp -a $(DEPS_PATH)/curl/curl/lib/.libs/libcurl$(SHLIB_EXT)* .
#
# Without this prerequisite `unit_tests` runs CONCURRENTLY with `tap` under the
# `all`/`debug` targets above, so a unit test's linker can open libcurl.so while
# that cp is still writing it and fail with `file too short`. Intermittent by
# nature -- it needs the copy and a link to overlap -- and it presents as a
# corrupt library rather than a build-order problem, which makes it easy to
# misread as a real toolchain or dependency failure. Every sibling target here
# (tests, tests_no_infra, tests_with_deps) already declares these prerequisites;
# unit_tests was the only one that did not.
.PHONY: unit_tests
unit_tests:
unit_tests: tap test_deps
cd tests/unit && CC=${CC} CXX=${CXX} ${MAKE} $(MAKECMDGOALS)


Expand Down
Loading