1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

Fix namespace collision for test.

To avoid linking issues with Rust's libtest, the crate for the test
utility was changed to 'uutest'. However, the user doesn't need to see
this so a few hoops were jumped through to make this transparent.

I also updated the make rules to build the individual features first and
then uutils. This makes 'make && make test' look more organized.
This commit is contained in:
Joseph Crail 2015-11-27 01:54:18 -05:00
parent cfadcfaf64
commit d4e0ea41a3
6 changed files with 19 additions and 30 deletions

View file

@ -67,7 +67,7 @@ PROGS := \
sync \
tac \
tee \
test_uu \
test \
tr \
true \
truncate \
@ -163,7 +163,7 @@ build_exe_$(1):
endef
define TEST_INTEGRATION
test_integration_$(1):
test_integration_$(1): build_exe_$(1)
${CARGO} test --test $(1) --features $(1) --no-default-features
endef
@ -206,11 +206,10 @@ use_default := 1
$(foreach util,$(EXES),$(eval $(call BUILD_EXE,$(util))))
build-uutils:
build-uutils: $(addprefix build_exe_,$(EXES))
${CARGO} build --features "${EXES}" ${PROFILE_CMD} --no-default-features
build: build-uutils $(addprefix build_exe_,$(EXES))
$(foreach util, ${EXES}, $(call build_pkg, ${util}))
build: build-uutils
$(foreach test,$(TESTS),$(eval $(call TEST_INTEGRATION,$(test))))
$(foreach test,$(TESTS),$(eval $(call TEST_UNIT,$(test))))