following advice from Gerald, Graham Bloice, and others, let's try copying the unit test executables into the wireshark-gtk2 directory before running them.

svn path=/trunk/; revision=21472
This commit is contained in:
Richard van der Hoff 2007-04-18 22:31:47 +00:00
parent e7e9a81155
commit 674306a87d
2 changed files with 29 additions and 1 deletions

View File

@ -211,6 +211,21 @@ reassemble_test.exe: reassemble_test.obj tvbuff.obj except.obj strutil.obj emem.
$(GLIB_LIBS) $(ZLIB_LIBS) reassemble_test.obj tvbuff.obj \
except.obj strutil.obj emem.obj reassemble.obj
exntest_install:
set copycmd=/y
if exist exntest.exe xcopy exntest.exe $(INSTALL_DIR) /d
if exist exntest.exe.manifest xcopy exntest.exe.manifest $(INSTALL_DIR) /d
tvbtest_install:
set copycmd=/y
if exist exntest.exe xcopy exntest.exe $(INSTALL_DIR) /d
if exist exntest.exe.manifest xcopy exntest.exe.manifest $(INSTALL_DIR) /d
reassemble_test_install:
set copycmd=/y
if exist exntest.exe xcopy exntest.exe $(INSTALL_DIR) /d
if exist exntest.exe.manifest xcopy exntest.exe.manifest $(INSTALL_DIR) /d
# (Windows only) Copy some sources from /trunk to /trunk/epan.
# It is a cleaner to compile these sources seperately with this makefile than

View File

@ -37,6 +37,19 @@ unittests_step_test() {
return
fi
# if we're on windows, we have to copy the test exe, and its manifest, to the gtk2
# dir before we can use them.
if [ "$WS_SYSTEM" == "Windows" ] ; then
(cd `dirname $DUT` && $MAKE install_`basename $DUT` INSTALL_DIR=`pwd`/wireshark_gtk2) > testout.txt 2>&1
if [ $? -ne 0]; then
echo
cat ./testout.txt
test_step_failed "install $DUT failed"
return
fi
DUT=`pwd`/wireshark_gtk2/`basename $DUT`
fi
$DUT > testout.txt 2>&1
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
@ -71,7 +84,7 @@ unittests_cleanup_step() {
unittests_suite() {
test_step_set_pre unittests_cleanup_step
test_step_set_post unittests_cleanup_step
#test_step_add "exntest" unittests_step_exntest
test_step_add "exntest" unittests_step_exntest
test_step_add "reassemble_test" unittests_step_reassemble_test
test_step_add "tvbtest" unittests_step_tvbtest
}