Commit Graph

38 Commits

Author SHA1 Message Date
Dario Lombardo 8a5385b9c9 More licenses converted to SPDX.
Change-Id: Id4f987dcdacf06622d70263f4659a4400e30dc39
Reviewed-on: https://code.wireshark.org/review/26332
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 13:35:49 +00:00
Peter Wu 1b9d46a950 tests: do not invoke missing unit tests
If the "test-programs" target is not built, then it should not try to
invoke the last program (wireshark-gtk in my case).

Change-Id: Ida60a71d1dc47305ef8abe10e6c96c8a1cb8dcbb
Reviewed-on: https://code.wireshark.org/review/18346
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-21 22:36:22 +00:00
João Valverde 47fbdc297a Fix unit test location for out of tree autotools build
Make it find test programs under the build tree.

Change-Id: Ie7ff547417e8f248bb58f6c96896977ca4e710d1
Reviewed-on: https://code.wireshark.org/review/17048
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-15 10:00:59 +00:00
Pascal Quantin 6baa1b544c Remove Nmake build system
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61
Reviewed-on: https://code.wireshark.org/review/15777
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15 19:21:57 +00:00
Alexis La Goutte 05384709a0 Suite test: fix modelines for bash script (emac)
c-basic-offset -> sh-basic-offset

Change-Id: I16b19b608fbdb7f0408f7c31871fae746c8c4f50
Reviewed-on: https://code.wireshark.org/review/13683
Reviewed-by: cedric izoard <cedric.izoard@ceva-dsp.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-03 12:35:30 +00:00
Jeff Morriss 3ff5afd541 Add a test to verify we pre-allocated enough hf entries.
This way we'll know as soon as we drop below the pre-allocated limit. As
suggested by Graham on https://code.wireshark.org/review/10601

Change-Id: Ieeb14bdcf991d7a67c30787c97ca24ebb35d1763
Reviewed-on: https://code.wireshark.org/review/10627
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-23 20:09:39 +00:00
Gerald Combs 9670f05384 Add ftsanity.py to the unit tests.
Change-Id: Ib480d8be5f66c70a4213af27acee94016fbf974b
Reviewed-on: https://code.wireshark.org/review/7855
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-30 21:02:21 +00:00
Gerald Combs f074647d2b Add a test-programs target everywhere.
Add a "test-programs" target to each toolchain which builds each unit
test executable. "test-programs" must now be built before running
the unit test suite.

Change-Id: I9317a1e305d987f244c4bd8b4a7f05d11fed7090
Reviewed-on: https://code.wireshark.org/review/7673
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-13 22:41:40 +00:00
Graham Bloice e7d0cdc061 Fix lua tests on Windows
Convert TEST_DIR path to a Windows path, this is used in all the lua tests.
Fix a typo

Change-Id: I38808822c998ed1df007732b3701b6b13d6c886b
Reviewed-on: https://code.wireshark.org/review/6235
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-02 16:49:40 +00:00
Evan Huus 5fda232659 make unit-test suite work out-of-tree
Change-Id: I638015a9b55712bb6843d6756c9c55915e142372
Reviewed-on: https://code.wireshark.org/review/2893
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 12:08:13 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Hadriel Kaplan fe769e7350 Add 4 more test scripts for Lua, and its own testsuite menu
This adds test scripts for verifying Pinfo, Address, Field, FieldInfo, NSTime
and Listener classes/functions.  It also moves Lua test scripts out of
unittests and into its own new testsuite.

Change-Id: I65c238fd459efb96db3f8f9145842cd038dea7c7
Reviewed-on: https://code.wireshark.org/review/270
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-20 18:42:13 +00:00
Hadriel Kaplan c4f1777a97 Adds support for Lua struct library so one can pack/unpack binary structures
This is based on Roberto Ierusalimschy's struct library, along with additional
options based on Flemming Madsen's patch to the lua-users mailing list, and
some changes I made to support 64-bit integer packing/unpacking.  Details
are in the top comments for wslua_struct.c.  This also includes a test script.

Change-Id: Ifcd0116ba013d5c760927721c8d6e9f28965534b
Reviewed-on: https://code.wireshark.org/review/98
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-14 10:11:50 +00:00
Hadriel Kaplan 58fe488822 Lua: add ability for scripts loaded from command-line to be passed arguments
This change adds the ability to pass on to lua scripts loaded from the
command-line (tshark or wireshark) additional arguments supplied by the
command-line.  This will help us in our testsuites, but also might be
useful for user-created scripts.  The additional arguments are passed in
using the '-X' eXtension switch.

Change-Id: Ib94cdf1ffd194ca84692fee7816665e4ff95efbd
Reviewed-on: https://code.wireshark.org/review/156
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-13 22:32:58 +00:00
Hadriel Kaplan f5a1786ea1 Add test suite for Lua dissector-related functions
This isn't super-fancy, but it runs a simple protocol dissector and verifies the tshark output
matches what it expects.  Things like Proto, ProtoField, Field, Tvb, TvbRange, etc., are used
in an example dissector script - it dissects DNS... partially.  Enough to make sure things
aren't fundamentally broken.  This provides something to add on top of later as well.

Change-Id: Icf3c8e9534944bcf4c4f6150f02a9a43f999cd75
Reviewed-on: https://code.wireshark.org/review/126
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-09 19:55:43 +00:00
Evan Huus 1cd7828527 Various fixes to the Lua int64 code
- add casts to pacify certain buildbots
- skip test if lua isn't available

Change-Id: I614c05dca40cb848c87b361e4b3d3c4e94aafb9e
Reviewed-on: https://code.wireshark.org/review/97
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-04 00:59:07 +00:00
Hadriel Kaplan 2e7f771a18 Adds support for Lua Int64 and UInt64 operators, functions, and general
usefulness, working around bug #9162 until Lua 5.3 is released.

The existing Int64 and UInt64 classes provide virtually no
usefullness, other than for creating a string of their value.  While
one could then write Lua code to convert the string to Lua numbers and
such, ultimately Lua has no native 64-bit integer support, making such
a task difficult to handle in Lua.  This change adds a host of
functions and operators to the existing Int64 (gint64) and UInt64
(guint64) classes, to enable true 64-bit integer support on par with
native Lua numbers.

A test script is also provided, which tests the functions/operators.

Change-Id: I4c5f8f5219b9a88198902283bd32ddf24c346bbe
Reviewed-on: https://code.wireshark.org/review/83
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-04 00:37:46 +00:00
Michael Mann 3635bea0a4 Add OID unit tests. Bug 9294 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9294)
From Ed Beroset

svn path=/trunk/; revision=52692
2013-10-19 18:52:13 +00:00
Evan Huus 81a0f156cd Try to fix unittest path magic on windows.
svn path=/trunk/; revision=52400
2013-10-06 14:15:38 +00:00
Evan Huus e0cc11c92b From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9174
Support running most tests out-of-tree. Use case is to have a source tree and
use a semi-unprivileged user to perform tests (to rule out interference).

From me:
- fix unit-test suite, it has to build the binaries it runs so it must
  more-or-less ignore the out-of-tree stuff
- fix name-res suite, just missing a path qualifier


svn path=/trunk/; revision=52397
2013-10-06 12:44:10 +00:00
Evan Huus 51a1e7e91e Run the wmem unit tests with --verbose (provided by glib) so that if
one of the random bits fails we get the seed to reproduce with.

svn path=/trunk/; revision=48576
2013-03-27 02:35:32 +00:00
Evan Huus 4ba4e1df70 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
2013-03-23 23:51:07 +00:00
Chris Maynard ce6f1d2f9c Whitespace changes: Convert spaces to tabs. Add modelines.
svn path=/trunk/; revision=47975
2013-03-01 16:13:44 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Gerald Combs 805c4779fa Update INSTALL_DIR to match r42659.
svn path=/trunk/; revision=42660
2012-05-16 17:57:12 +00:00
Ulf Lamping 54e08d8e3d fix a comment: manifest files are now embedded into .exe / .dll files, no need to copy them
svn path=/trunk/; revision=23547
2007-11-23 08:42:58 +00:00
Bill Meier c4531ac2a8 Re-enable unittests after determining that they work correctly
on Windows (and shouldn't cause the Windows buildbot any problems).

svn path=/trunk/; revision=22686
2007-08-27 18:09:38 +00:00
Bill Meier b089f00013 Disable capture tests and unit tests until possible issues corrected.
Hopefully the windows buildbot will be OK with these tests disabled
temporarily.

svn path=/trunk/; revision=22660
2007-08-25 19:13:00 +00:00
Bill Meier 6386eda24c Addt'l fixes so suite-unittests will run under windows
svn path=/trunk/; revision=21546
2007-04-24 03:43:08 +00:00
Bill Meier 2c346d9a3c Use correct install target: 'make ..._install (and not 'make 'install_...')
svn path=/trunk/; revision=21545
2007-04-24 02:17:35 +00:00
Richard van der Hoff e12cf1df47 fix typos
svn path=/trunk/; revision=21476
2007-04-19 17:03:58 +00:00
Richard van der Hoff 674306a87d 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
2007-04-18 22:31:47 +00:00
Richard van der Hoff c9360bf853 that didn't help. try skipping the exntest to see if it's just that one.
svn path=/trunk/; revision=21350
2007-04-07 04:35:39 +00:00
Richard van der Hoff 235cfd0f19 make the unit tests spam their output, in an attempt yo understand wtf the matter with the buildbot is
svn path=/trunk/; revision=21349
2007-04-07 02:18:57 +00:00
Richard van der Hoff c7f5b65111 another go at fixing the unit tests under windows - give a -f Makefile.nmake arg
svn path=/trunk/; revision=21314
2007-04-03 13:03:07 +00:00
Richard van der Hoff 2ab63b7719 hopefully fix this for win32 by using nmake
svn path=/trunk/; revision=21312
2007-04-03 10:53:38 +00:00
Jörg Mayer 5d913e1701 Propset suite-unittests.sh and add executable to .sh files
svn path=/trunk/; revision=21311
2007-04-03 06:55:25 +00:00
Richard van der Hoff 4500ada811 Run the epan unittests as part of the test suite
svn path=/trunk/; revision=21309
2007-04-03 01:54:30 +00:00