Skip to content

Commit d1deaa5

Browse files
committed
multi-server: fix clean targets, move framework clone to build/
- clean.test.multi-server removes build/tests/multi-server/ - distclean.test.multi-server also removes the cloned framework - Framework now clones to build/freeradius-multi-server/ so clean doesn't force a re-clone on every test run - Add comment explaining why abspath is needed
1 parent 3ebb2dd commit d1deaa5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/tests/multi-server/all.mk

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ top_srcdir := $(abspath ./)
2121
BUILD_DIR := ${top_srcdir}/build
2222
endif
2323

24+
# abspath is needed because BUILD_DIR is relative ("build") when
25+
# included from the top-level makefile, but paths are passed to
26+
# external tools (config_builder.py, docker compose) which need
27+
# absolute paths.
2428
DIR := $(abspath ${top_srcdir}/src/tests/multi-server)
2529
OUTPUT := $(abspath $(BUILD_DIR)/tests/multi-server)
2630

2731
# FIXME: We should be using packaged versions of the multi-server test framework
2832
# instead of cloning from git.
2933
TEST_MULTI_SERVER_GIT_REPO := https://github.com/InkbridgeNetworks/freeradius-multi-server.git
3034
TEST_MULTI_SERVER_GIT_BRANCH := main
31-
TEST_MULTI_SERVER_FRAMEWORK_DIR := $(OUTPUT)/freeradius-multi-server
35+
TEST_MULTI_SERVER_FRAMEWORK_DIR := $(abspath $(BUILD_DIR)/freeradius-multi-server)
3236

3337
#
3438
# Debug and verbosity settings
@@ -205,9 +209,16 @@ test.multi-server.ci: $(TEST_MULTI_SERVER_CI_TESTS)
205209

206210
.PHONY: clean.test.multi-server
207211
clean.test.multi-server:
212+
rm -rf $(OUTPUT)
208213

214+
.PHONY: distclean.test.multi-server
215+
distclean.test.multi-server: clean.test.multi-server
216+
rm -rf $(TEST_MULTI_SERVER_FRAMEWORK_DIR)
209217

210218
.PHONY: clean
211219
clean: clean.test.multi-server
212220

221+
.PHONY: distclean
222+
distclean: distclean.test.multi-server
223+
213224
clean.test: clean.test.multi-server

0 commit comments

Comments
 (0)