------------------------------------------------------------ revno: 6377 committer: Paul Tötterman <paul.totterman@xxxxxx> branch nick: methods-to-functions timestamp: Mon 2012-04-23 23:14:51 +0300 message: Add python tests to makefile target modified: .bzrignore Makefile.am tools/hipdnsproxy/hosts.py tools/hipdnsproxy/util.py -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file '.bzrignore' --- .bzrignore 2012-03-13 15:27:06 +0000 +++ .bzrignore 2012-04-23 20:14:51 +0000 @@ -62,5 +62,6 @@ tools/hipconf tools/hipdnskeyparse/hipdnskeyparse tools/hipdnsproxy/hipdnsproxy +tools/hipdnsproxy/testhipdnsproxy.py tools/nsupdate/nsupdate version.h === modified file 'Makefile.am' --- Makefile.am 2012-04-04 19:49:39 +0000 +++ Makefile.am 2012-04-23 20:14:51 +0000 @@ -65,7 +65,9 @@ if HIP_UNITTESTS TESTS = test/check_hipd \ test/check_hipfw \ - test/check_lib_core + test/check_lib_core \ + tools/hipdnsproxy/testhipdnsproxy.py \ + $(tools_hipdnsproxy_PYTHON) check_PROGRAMS = test/check_hipd \ test/check_hipfw \ test/check_lib_core @@ -293,13 +295,18 @@ nodist_doc_DATA = doc/HOWTO.html doc/HOWTO.txt $(wildcard $(addprefix $(srcdir)/doc/,*.png)) endif +tools/hipdnsproxy/testhipdnsproxy.py: tools/hipdnsproxy/hipdnsproxy + head -n -2 $^ > $@ + echo -e "if __name__ == '__main__':\n\timport doctest; doctest.testmod(raise_on_error=True)" >> $@ + chmod a+x $@ + doc/HOWTO.html: doc/HOWTO.xml xmlto -o $(@D) html-nochunks $< doc/HOWTO.txt: doc/HOWTO.xml xmlto -o $(@D) txt $< -CLEANFILES = doc/HOWTO.html doc/HOWTO.txt +CLEANFILES = doc/HOWTO.html doc/HOWTO.txt tools/hipdnsproxy/testhipdnsproxy.py clean-local: rm -rf doc/doxy rpmbuild === modified file 'tools/hipdnsproxy/hosts.py' --- tools/hipdnsproxy/hosts.py 2012-04-20 11:37:18 +0000 +++ tools/hipdnsproxy/hosts.py 2012-04-23 20:14:51 +0000 @@ -328,4 +328,4 @@ if __name__ == '__main__': import doctest - doctest.testmod() + doctest.testmod(raise_on_error=True) === modified file 'tools/hipdnsproxy/util.py' --- tools/hipdnsproxy/util.py 2012-04-03 18:22:15 +0000 +++ tools/hipdnsproxy/util.py 2012-04-23 20:14:51 +0000 @@ -195,4 +195,4 @@ if __name__ == '__main__': import doctest - doctest.testmod() + doctest.testmod(raise_on_error=True)