diff --git a/CHANGES b/CHANGES index 127643bd68..461b8004f7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +6.0.0-dev.457 | 2023-04-27 11:25:45 -0700 + + * Modify Windows test cmd file to actually run tests (Tim Wojtulewicz) + + * Add template file and cmake call for zeek-path setup on Windows (Tim Wojtulewicz) + 6.0.0-dev.453 | 2023-04-27 13:22:43 +0200 * Revert putting plugins into a fresh scope for now (Dominik Charousset, Corelight) diff --git a/CMakeLists.txt b/CMakeLists.txt index 992aaca2b4..03eab558b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -423,6 +423,10 @@ set(cmake_install_prefix "${CMAKE_INSTALL_PREFIX}") set(cmake_source_dir "${CMAKE_SOURCE_DIR}") set(zeek_script_install_path "${ZEEK_SCRIPT_INSTALL_PATH}") if ( MSVC ) + # This has to happen before we modify the paths below so that + # the pure Windows paths are stored in the output file. + configure_file(zeek-path-dev.bat.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev.bat) + string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_binary_dir "${cmake_binary_dir}") string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_current_binary_dir "${cmake_current_binary_dir}") string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_install_prefix "${cmake_install_prefix}") diff --git a/VERSION b/VERSION index b18b5e6dcc..fa41b8e4f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.0-dev.453 +6.0.0-dev.457 diff --git a/ci/windows/test.cmd b/ci/windows/test.cmd index aae40887d9..5b5ff7329f 100644 --- a/ci/windows/test.cmd +++ b/ci/windows/test.cmd @@ -1,7 +1,11 @@ :: See build.cmd for documentation on this call. call "c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 -:: We currently don't have any tests to run on Windows, so this is just commented out. -:: We'll expand on this later. -:: cd build -:: ctest -C release || exit \b 1 +cd build + +:: This sets up ZEEKPATH and ZEEK_PLUGIN_PATH +call zeek-path-dev.bat + +:: Only run the unit tests for now. Btest is supported on Windows but a ton +:: of tests are still failing so it's not worth trying to run it. +src\zeek --test diff --git a/zeek-path-dev.bat.in b/zeek-path-dev.bat.in new file mode 100644 index 0000000000..8602245e2a --- /dev/null +++ b/zeek-path-dev.bat.in @@ -0,0 +1,8 @@ +:: Sets up the basic environment needed to run Zeek from a Windows command prompt (not bash!). +:: This is needed in order to run unit tests on Cirrus. +:: +:: The ZEEKPATH line here should be kept in sync with the zeek-path-dev.in file. +:: + +@set ZEEKPATH=.;${cmake_source_dir}/scripts;${cmake_source_dir}/scripts/policy;${cmake_source_dir}/scripts/site;${cmake_binary_dir}/scripts;${cmake_binary_dir}/scripts/builtin-plugins +@set ZEEK_PLUGIN_PATH=${cmake_binary_dir}/src} diff --git a/zeek-path-dev.in b/zeek-path-dev.in index 0c5fa4fbd2..e80b2222d2 100755 --- a/zeek-path-dev.in +++ b/zeek-path-dev.in @@ -9,5 +9,6 @@ # # ZEEKPATH=`./zeek-path-dev` ./src/zeek # +# This file should be kept in sync with the ZEEKPATH line in zeek-path-dev.bat.in. echo .:${cmake_source_dir}/scripts:${cmake_source_dir}/scripts/policy:${cmake_source_dir}/scripts/site:${cmake_binary_dir}/scripts:${cmake_binary_dir}/scripts/builtin-plugins