3 # Run the epan unit tests
7 # Wireshark - Network traffic analyzer
8 # By Gerald Combs <gerald@wireshark.org>
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 if [ "$WS_SYSTEM" == "Windows" ] ; then
26 MAKE="nmake -f Makefile.nmake"
31 unittests_step_test() {
32 ( cd `dirname $DUT` && $MAKE `basename $DUT` ) >testout.txt 2>&1
36 test_step_failed "make $DUT failed"
40 # if we're on windows, we have to copy the test exe to the wireshark-gtk2
41 # dir before we can use them.
42 # {Note that 'INSTALL_DIR' must be a Windows Pathname)
43 if [ "$WS_SYSTEM" == "Windows" ] ; then
44 (cd `dirname $DUT` && $MAKE `basename $DUT`_install INSTALL_DIR='..\wireshark-gtk2') > testout.txt 2>&1
48 test_step_failed "install $DUT failed"
51 DUT=../wireshark-gtk2/`basename $DUT`
54 $DUT > testout.txt 2>&1
56 if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
59 test_step_failed "exit status of $DUT: $RETURNVALUE"
66 unittests_step_exntest() {
71 unittests_step_reassemble_test() {
72 DUT=../epan/reassemble_test
76 unittests_step_tvbtest() {
81 unittests_cleanup_step() {
86 test_step_set_pre unittests_cleanup_step
87 test_step_set_post unittests_cleanup_step
88 test_step_add "exntest" unittests_step_exntest
89 test_step_add "reassemble_test" unittests_step_reassemble_test
90 test_step_add "tvbtest" unittests_step_tvbtest