Skip to content

Commit

Permalink
Implement "make check" for zenmap
Browse files Browse the repository at this point in the history
Currently, this just uses Python's unittest module to autodiscover
tests, which may skip some, but is better than nothing. TODO: move tests
to their own module and let the zenmap_check target test them directly.
  • Loading branch information
bonsaiviking committed Jan 9, 2014
1 parent 3c9eeb3 commit 96141b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,10 @@ ncat_check:
nsock_check:
@cd $(NSOCKDIR)/src && $(MAKE) check

check: @NCAT_CHECK@ @NSOCK_CHECK@
zenmap_check:
@cd $(ZENMAPDIR) && $(PYTHON) -m unittest discover build/lib.* '*.py'

check: @NCAT_CHECK@ @NSOCK_CHECK@ @ZENMAP_CHECK@

${srcdir}/configure: configure.ac
cd ${srcdir} && autoconf
Expand Down
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ NPINGDIR
subdirs
ZENMAP_DIST_CLEAN
ZENMAP_CLEAN
ZENMAP_CHECK
UNINSTALLZENMAP
INSTALLZENMAP
BUILDZENMAP
Expand Down Expand Up @@ -5953,12 +5954,14 @@ if test "$with_zenmap" = "no"; then
BUILDZENMAP=""
INSTALLZENMAP=""
UNINSTALLZENMAP=""
ZENMAP_CHECK=""
ZENMAP_CLEAN=""
ZENMAP_DIST_CLEAN=""
else
BUILDZENMAP=build-zenmap
INSTALLZENMAP=install-zenmap
UNINSTALLZENMAP=uninstall-zenmap
ZENMAP_CHECK=zenmap_check
ZENMAP_CLEAN=zenmap_clean
ZENMAP_DIST_CLEAN=zenmap_dist_clean
fi
Expand All @@ -5969,6 +5972,7 @@ fi




NPINGDIR=nping

# Do they want Nping?
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,22 @@ if test "$with_zenmap" = "no"; then
BUILDZENMAP=""
INSTALLZENMAP=""
UNINSTALLZENMAP=""
ZENMAP_CHECK=""
ZENMAP_CLEAN=""
ZENMAP_DIST_CLEAN=""
else
BUILDZENMAP=build-zenmap
INSTALLZENMAP=install-zenmap
UNINSTALLZENMAP=uninstall-zenmap
ZENMAP_CHECK=zenmap_check
ZENMAP_CLEAN=zenmap_clean
ZENMAP_DIST_CLEAN=zenmap_dist_clean
fi
AC_SUBST(ZENMAPDIR)
AC_SUBST(BUILDZENMAP)
AC_SUBST(INSTALLZENMAP)
AC_SUBST(UNINSTALLZENMAP)
AC_SUBST(ZENMAP_CHECK)
AC_SUBST(ZENMAP_CLEAN)
AC_SUBST(ZENMAP_DIST_CLEAN)

Expand Down

0 comments on commit 96141b4

Please sign in to comment.