diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-05-05 15:53:54 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-05-06 23:56:41 +0000 |
commit | f72481a144b1a0e94b0fb053448f9fb6d36d1eb4 (patch) | |
tree | c6529f042ff4dc4ab88750b8ab00da5d5b13130f /CMakeLists.txt | |
parent | b27cd6251918974e04e6021105ad58284489273b (diff) |
Test: Make sure we run our display filter tests.
Change the test suite list in CMakeLists.txt to a static list. Add a
CTest coverage unit test.
Change-Id: I8459f320a2d0707618d6d56abdfce80274fddd2d
Reviewed-on: https://code.wireshark.org/review/27377
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index edaaa020ed..369c431b62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2957,7 +2957,7 @@ if(RPMBUILD_EXECUTABLE) _SET_GITVERSION_CMAKE_VARIABLE(_git_description) - if (NOT _git_description) + if (NOT _git_description) # We're building the rpm outside the source. Guess the version from the dirname. get_filename_component(CMAKE_SOURCE_DIR_NAME ${CMAKE_SOURCE_DIR} NAME) # XXX this assumes the directory to start with "wireshark-" @@ -3160,26 +3160,37 @@ set_target_properties(test-programs PROPERTIES # Test suites enable_testing() -file(GLOB _test_suite_py_list test/suite_*.py) +# We could try to build this list dynamically, but given that we tend to +# go years between adding suites just run +# test/test.py --list-suites | sort +# and paste the output here. +set(_test_suite_list + suite_capture + suite_clopts + suite_decryption + suite_dfilter + suite_dissection + suite_fileformats + suite_io + suite_mergecap + suite_nameres + suite_text2pcap + suite_unittests + suite_wslua +) if(WIN32) set(_test_suite_program_path ./run/$<CONFIG>) else() set(_test_suite_program_path ./run) endif() -# We currently don't handle spaces in arguments. On Windows this +# We don't currently handle spaces in arguments. On Windows this # means that you will probably have to pass in an interface index # instead of a name. set(TEST_EXTRA_ARGS "" CACHE STRING "Extra arguments to pass to test/test.py") separate_arguments(TEST_EXTRA_ARGS) -# We can enumerate suites two ways: by probing the filesystem and by -# running `test.py --list-suites`. Probe the filesystem for now, which -# should hopefully give us enough parallelization. If we want to split -# our tests by cases or individual tests we'll have to run and parse -# `test.py --list-cases` or `test.py --list` respectively. -foreach(_suite_py ${_test_suite_py_list}) - get_filename_component(_suite_name ${_suite_py} NAME_WE) +foreach(_suite_name ${_test_suite_list}) add_test( NAME ${_suite_name} COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/test.py |