From: Arran Cudbard-Bell Date: Tue, 26 Feb 2013 00:04:04 +0000 (-0500) Subject: Pass port to runtest.sh X-Git-Tag: release_3_0_0_beta1~929 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ec6cce71671e2c9925f35ecd494b07f35a90057;p=thirdparty%2Ffreeradius-server.git Pass port to runtest.sh --- diff --git a/src/tests/Makefile b/src/tests/Makefile index 2c8c2870ddb..983e5b8d3b7 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -21,6 +21,7 @@ TESTS = user_password chap mschapv1 digest-01/digest* test.example.com \ wimax PORT = 12340 +#PORT = 1812 ACCTPORT = $(shell expr $(PORT) + 1) # example.com stripped.example.com @@ -59,7 +60,7 @@ test.conf: dictionary @echo '$$INCLUDE $${testdir}/config/' >> test.conf radiusd.pid: $(RADDB_PATH)/test.conf test.conf raddb - @$(BIN_PATH)/radiusd -txxl `pwd`/radius.log -md $(RADDB_PATH)/ -n test -i 127.0.0.1 -p $(PORT) + $(BIN_PATH)/radiusd -txxl `pwd`/radius.log -md $(RADDB_PATH)/ -n test -i 127.0.0.1 -p $(PORT) # We can't make this depend on radiusd.pid, because then make will create # radiusd.pid when we make radiusd.kill, which we don't want. @@ -90,7 +91,7 @@ tests: $(RADDB_PATH)/test.conf radiusd.kill @chmod a+x runtests.sh @rm -f radius.log @$(MAKE) radiusd.pid - @BIN_PATH="$(BIN_PATH)" ./runtests.sh $(TESTS) + @BIN_PATH="$(BIN_PATH)" PORT="$(PORT)" ./runtests.sh $(TESTS) @$(MAKE) radiusd.kill @rm -f $(RADDB_PATH)/test.conf diff --git a/src/tests/runtests.sh b/src/tests/runtests.sh index 9253044a2d3..902f0593803 100755 --- a/src/tests/runtests.sh +++ b/src/tests/runtests.sh @@ -1,11 +1,9 @@ #!/bin/bash -# BIN_PATH should be specified by the caller -#BIN_PATH=../main/ - -PORT=12340 -HOME_PORT=12350 -SECRET=testing123 +: ${BIN_PATH=./} +: ${PORT=12340} +: ${HOME_PORT=12350} +: ${SECRET=testing123} rm -f verbose.log RCODE=0