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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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=$SOURCE_DIR/wireshark-gtk2/`basename $DUT`
54 $DUT $ARGS > testout.txt 2>&1
56 if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
59 test_step_failed "exit status of $DUT: $RETURNVALUE"
66 unittests_step_exntest() {
67 DUT=$SOURCE_DIR/epan/exntest
72 unittests_step_oids_test() {
73 DUT=$SOURCE_DIR/epan/oids_test
78 unittests_step_reassemble_test() {
79 DUT=$SOURCE_DIR/epan/reassemble_test
84 unittests_step_tvbtest() {
85 DUT=$SOURCE_DIR/epan/tvbtest
90 unittests_step_wmem_test() {
91 DUT=$SOURCE_DIR/epan/wmem/wmem_test
96 unittests_cleanup_step() {
101 test_step_set_pre unittests_cleanup_step
102 test_step_set_post unittests_cleanup_step
103 test_step_add "exntest" unittests_step_exntest
104 test_step_add "oids_test" unittests_step_oids_test
105 test_step_add "reassemble_test" unittests_step_reassemble_test
106 test_step_add "tvbtest" unittests_step_tvbtest
107 test_step_add "wmem_test" unittests_step_wmem_test
110 # Editor modelines - http://www.wireshark.org/tools/modelines.html
115 # indent-tabs-mode: t
118 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
119 # :indentSize=8:tabSize=8:noTabs=false: