From 4ba4e1df703fd1c7c6b83f8cb3f53a886ac49931 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Sat, 23 Mar 2013 23:51:07 +0000 Subject: Add wmem unit test binary (still empty) to nmake build and to the unit test part of the test suite. Once I know it's building and running properly on the buildbots then I'll actually start writing tests. svn path=/trunk/; revision=48517 --- epan/wmem/Makefile.nmake | 18 +++++++++++++++++- test/suite-unittests.sh | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/epan/wmem/Makefile.nmake b/epan/wmem/Makefile.nmake index c265084b82..ab26b9a2e0 100644 --- a/epan/wmem/Makefile.nmake +++ b/epan/wmem/Makefile.nmake @@ -20,12 +20,28 @@ wmem.lib: $(WMEM_OBJECTS) link /lib /out:wmem.lib $(WMEM_OBJECTS) clean: - rm -f $(WMEM_OBJECTS) wmem.lib *.pdb *.sbr + rm -f $(WMEM_OBJECTS) wmem.lib *.pdb *.sbr wmem_test.obj wmem_test.exe distclean: clean maintainer-clean: distclean +# Rule for making unit tests +wmem_test: wmem_test.exe + +# Object files for wmem_test +WMEM_TEST_OBJ=wmem_test.obj +WMEM_TEST_LIBS= wmem.lib + +wmem_test.exe: $(WMEM_TEST_OBJ) $(WMEM_TEST_LIBS) + @echo Linking $@ + link /OUT:$@ $(conflags) $(conlibsdll) $(LOCAL_LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console \ + $(WMEM_TEST_LIBS) $(GLIB_LIBS) $(WMEM_TEST_OBJ) + +wmem_test_install: + set copycmd=/y + if exist wmem_test.exe xcopy wmem_test.exe ..\..\$(INSTALL_DIR) /d + checkapi: $(PERL) ../../tools/checkAPIs.pl -g termoutput -build \ $(WMEM_SRC) diff --git a/test/suite-unittests.sh b/test/suite-unittests.sh index d87563b820..05f1289ec0 100755 --- a/test/suite-unittests.sh +++ b/test/suite-unittests.sh @@ -78,6 +78,11 @@ unittests_step_tvbtest() { unittests_step_test } +unittests_step_wmem_test() { + DUT=../epan/wmem/wmem_test + unittests_step_test +} + unittests_cleanup_step() { rm -f ./testout.txt } @@ -88,6 +93,7 @@ unittests_suite() { test_step_add "exntest" unittests_step_exntest test_step_add "reassemble_test" unittests_step_reassemble_test test_step_add "tvbtest" unittests_step_tvbtest + test_step_add "wmem_test" unittests_step_wmem_test } # # Editor modelines - http://www.wireshark.org/tools/modelines.html -- cgit v1.2.1