From: Arran Cudbard-Bell Date: Tue, 26 Feb 2013 16:20:22 +0000 (-0500) Subject: Fixup tests X-Git-Tag: release_2_2_1~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3a89a05e253d5ff3b39e4d270c95b855d8826e4;p=thirdparty%2Ffreeradius-server.git Fixup tests --- diff --git a/Makefile b/Makefile index 987d980127e..14329b5c80d 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ clean: @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common @rm -f *~ -.PHONY: tests +.PHONY: test tests: @$(MAKE) -C src/tests tests diff --git a/src/tests/Makefile b/src/tests/Makefile index e85139bb02f..fddbd5e66b8 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -31,7 +31,7 @@ SECRET = testing123 all: tests clean: - @rm -f ../../raddb/test.conf test.conf dictionary + @rm -f $(top_builddir)/raddb/test.conf test.conf dictionary dictionary: @echo "# test dictionary not install. Delete at any time." > dictionary @@ -40,7 +40,7 @@ dictionary: test.conf: dictionary @echo "# test configuration file. Do not install. Delete at any time." > test.conf - @echo "libdir =" $(top_builddir)/src/modules/lib >> test.conf + @echo "libdir =" $(top_builddir)/src/modules/lib/.libs/ >> test.conf @echo "testdir =" $(top_builddir)/src/tests/ >> test.conf @echo 'dictionary = $${testdir}' >> test.conf @echo 'logdir = $${testdir}' >> test.conf @@ -50,7 +50,7 @@ test.conf: dictionary @echo '$$INCLUDE $${testdir}/config/' >> test.conf radiusd.pid: ../../raddb/test.conf test.conf - @../main/radiusd -txxl `pwd`/radius.log -md ../../raddb/ -n test -i 127.0.0.1 -p $(PORT) + @$(top_builddir)/src/main/radiusd -txxl `pwd`/radius.log -md $(top_builddir)/raddb/ -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. @@ -62,29 +62,29 @@ radiusd.kill: @rm -f radiusd.pid # Link from the main database directory to here -../../raddb/test.conf: test.conf - @[ -f ../../raddb/test.conf ] || ln -s ../src/tests/test.conf ../../raddb/ +$(top_builddir)/raddb/test.conf: test.conf + @[ -f $(top_builddir)/raddb/test.conf ] || ln -s $(top_builddir)/src/tests/test.conf $(top_builddir)/raddb/ # kill the server (if it's running) # start the server # run the tests (ignoring any failures) # kill the server # remove the changes to raddb/ -tests: ../../raddb/test.conf radiusd.kill +tests: $(top_builddir)/raddb/test.conf radiusd.kill @chmod a+x runtests.sh @rm -f radius.log @$(MAKE) radiusd.pid @./runtests.sh $(TESTS) @$(MAKE) radiusd.kill - @rm -f ../../raddb/test.conf + @rm -f $(top_builddir)/raddb/test.conf -tests.eap: ../../raddb/test.conf radiusd.kill +tests.eap: $(top_builddir)/raddb/test.conf radiusd.kill @chmod a+x runtests.sh @rm -f radius.log @$(MAKE) radiusd.pid @$(MAKE) eap @$(MAKE) radiusd.kill - @rm -f ../../raddb/test.conf + @rm -f $(top_buildir)/raddb/test.conf eap: $(EAP_TLS_TESTS) for x in $(EAP_TLS_TESTS); do \