]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Pass port to runtest.sh
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 26 Feb 2013 00:04:04 +0000 (19:04 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 26 Feb 2013 00:04:04 +0000 (19:04 -0500)
src/tests/Makefile
src/tests/runtests.sh

index 2c8c2870ddbd8c1cc765038e4326a575cee02891..983e5b8d3b76b68d6f926755eea14359edad25cb 100644 (file)
@@ -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
 
index 9253044a2d3ea37f331f4b447482fbf16c725316..902f0593803d74bfb8d968d20d2cd047f5425818 100755 (executable)
@@ -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