]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
exit after 5min in the tests
authorAlan T. DeKok <aland@freeradius.org>
Sun, 27 Apr 2025 14:35:49 +0000 (10:35 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 27 Apr 2025 14:35:49 +0000 (10:35 -0400)
and ignore -e in ndebug builds, rather than complain.

src/bin/radiusd.c
src/tests/radiusd.mk

index f4b8538c7c579bf72e7a8e4a5a7c7ee905de82f0..23272ac4cd32e3f66d1db676be9c7d6f376a87ac 100644 (file)
@@ -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;
index 000a42f6b514b523d517adcc46dc3481d72905a0..c08a3962c5064e246ef616b5c45e730393d5c517 100644 (file)
@@ -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)"; \