From: Alan T. DeKok Date: Sun, 27 Apr 2025 14:35:49 +0000 (-0400) Subject: exit after 5min in the tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b8a4e66f336b33d71d23ad7d141d8dacecfa54d;p=thirdparty%2Ffreeradius-server.git exit after 5min in the tests and ignore -e in ndebug builds, rather than complain. --- diff --git a/src/bin/radiusd.c b/src/bin/radiusd.c index f4b8538c7c..23272ac4cd 100644 --- a/src/bin/radiusd.c +++ b/src/bin/radiusd.c @@ -360,11 +360,14 @@ int main(int argc, char *argv[]) main_config_dict_dir_set(config, optarg); break; -#ifndef NDEBUG case 'e': + /* + * For non-debug builds, accept '-e', but ignore it. + */ +#ifndef NDEBUG exit_after = fr_time_delta_from_sec(atoi(optarg)); - break; #endif + break; case 'f': config->daemonize = false; diff --git a/src/tests/radiusd.mk b/src/tests/radiusd.mk index 000a42f6b5..c08a3962c5 100644 --- a/src/tests/radiusd.mk +++ b/src/tests/radiusd.mk @@ -101,7 +101,7 @@ $(TEST).radiusd_stop: | ${2} # Start radiusd instance # ${2}/radiusd.pid: ${2} - $$(eval RADIUSD_RUN := TESTDIR=$(DIR) OUTPUT=${2} TEST_PORT=$(PORT) TEST=$(subst test.,,$(TEST)) $$(RADIUSD_BIN) -Pxxx -d $(DIR)/config -n ${1} -D $(DICT_PATH) -l ${2}/radiusd.log) + $$(eval RADIUSD_RUN := TESTDIR=$(DIR) OUTPUT=${2} TEST_PORT=$(PORT) TEST=$(subst test.,,$(TEST)) $$(RADIUSD_BIN) -Pxxx -d $(DIR)/config -e 300 -n ${1} -D $(DICT_PATH) -l ${2}/radiusd.log) ${Q}rm -f ${2}/radiusd.log ${Q}if test ! -z "$$(PRINT_PORT)"; then \ echo "$(PORT)"; \