clamav/unit_tests
Micah Snyder c81968d3a7 GitHub Actions testing on Ubuntu, Mac, & Windows
Updates to fix issues in the CMake install instructions.

Updates the README.md to indicate that CMake is now preferred

Adds a GitHub Actions badge, Discord badge, and logo to the README.md.

CMake:

- Renamed ENABLE_DOCS to ENABLE_MAN_PAGES.

- Fixed build issue when milter isn't enabled on Linux. Changed the
default to build milter on non-macOS, non-Windows operating systems.

- Fix LD_LIBRARY_PATH for tests including on macOS where LD_LIBRARY_PATH
  and DYLD_LIBRARY_PATH must be manually propagated to subprocesses.

- Use UNKNOWN IMPORTED library instead of INTERFACE IMPORTED library for
  pdcurses, but still use INTERFACE IMPORTED for ncurses.
  UNKNOWN IMPORTED appears to be required so that we can use
  $<TARGET_FILE_DIR:Curses::curses> to collected the pdcurses library at
  install time on Windows.

- When building with vcpkg on Windows, CMake will automatically install
  your app local dependencies (aka the DLL runtime dependencies).
  Meanwhile, file(GET_RUNTIME_DEPENDENCIES ...) doesn't appear to work
  correctly with vcpkg packages. The solution is to use a custom target
  that has CMake perform a local install to the unit_tests directory
  when using vcpkg.
  This is in fact far easier than using GET_RUNTIME_DEPENDENCIES in the
  unit_tests for assembling the test environment but we can't use this
  method for the non-vcpkg install because it won't collect
  checkDynamic.dll for us because we don't install our tests.
  We also can't link with the static check.lib because the static
  check.lib has pthreads symbols linked in and will conflict with our
  pthread.dll.

  TL;DR: We'll continue to use file(GET_RUNTIME_DEPENDENCIES ...) for
  assembling the test enviornment on non-vcpkg builds, and use the local
  install method for vcpkg builds.

testcase.py: Wrapped a Pathlib.unlink() call in exception handling as
the missing_ok optional parameter requires a Python version too new for
common use.

Remove localtime_r from win32 compat lib.
localtime_r may be present in libcheck when building with vcpkg and
while making it a static function would also solve the issue, using
localtime_s instead like we do everywhere else should work just fine.

check_clamd: Limited the max # of connections for the stress test on Mac
to 850, to address issues found testing on macos-latest on GitHub Actions.
2021-02-25 11:41:28 -08:00
..
.split clamd, clamscan, libclamav: new option HeuristicScanPrecedence (bb #649) 2008-07-31 10:51:46 +00:00
input Fix several coverity warnings 2020-07-15 08:39:32 -07:00
buf.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
buf.notags.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
check1_clamscan.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check2_clamd.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check3_clamd.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check4_clamd.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check5_clamd_vg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check6_clamd_vg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check7_clamd_hg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check8_clamd_hg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check9_clamscan_vg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check_bytecode.c CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
check_clamav.c CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
check_clamav_skip.c bb12596: Fix build issue when libcheck missing 2020-08-24 15:11:07 -07:00
check_clamd.c GitHub Actions testing on Ubuntu, Mac, & Windows 2021-02-25 11:41:28 -08:00
check_common.sh CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
check_disasm.c CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
check_fpu_endian.c Add CMake build tooling 2020-08-13 00:25:34 -07:00
check_freshclam.sh add unit tests for binaries 2008-07-10 17:08:41 +00:00
check_htmlnorm.c CMake: Add fuzz support. 2021-02-25 11:41:26 -08:00
check_jsnorm.c unit tests: Fix ck_assert_msg() call 2021-01-07 14:24:59 -08:00
check_matchers.c Add CMake build tooling 2020-08-13 00:25:34 -07:00
check_regex.c CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
check_sigtool.sh add unit tests for binaries 2008-07-10 17:08:41 +00:00
check_str.c Add CMake build tooling 2020-08-13 00:25:34 -07:00
check_uniq.c Add CMake build tooling 2020-08-13 00:25:34 -07:00
check_unit_vg.sh Fix unit test script. 2010-03-24 16:46:21 +02:00
checks.h CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
clamd_test.py GitHub Actions testing on Ubuntu, Mac, & Windows 2021-02-25 11:41:28 -08:00
clamscan_test.py CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
CMakeLists.txt GitHub Actions testing on Ubuntu, Mac, & Windows 2021-02-25 11:41:28 -08:00
duma_tests.sh disable duma tests by default, they time out even on fast machines. 2009-02-25 20:41:16 +00:00
efence_tests.sh set EF_ALIGNMENT=8 for non-x86 platforms. (bb #1385) 2009-05-06 07:56:41 +00:00
encode.js.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
encode.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
freshclam_test.py CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
js.js.ref Revert "follow-up bb#11217 - fixed html normalization" 2014-12-09 10:57:53 -05:00
js.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
libclamav_test.py CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
Makefile.am CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
preload_run.sh Allow ulimit to fail (bb #2301). 2010-10-18 12:55:20 +03:00
Run-GetLibs.ctest CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
sigtool_test.py CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
test-freshclam.conf we need a config file for freshclam just to test -V, use a minimal one. 2008-10-29 19:06:27 +00:00
test.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
test.notags.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
testcase.py GitHub Actions testing on Ubuntu, Mac, & Windows 2021-02-25 11:41:28 -08:00
urls.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
urls.notags.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
valgrind.supp Update valgrind suppression rule 2020-08-31 13:59:33 -07:00
valgrind_tests.sh Converting http urls to https urls. Primary focus was on clamav.net urls. I updated a couple others and fixes a few broken links as well. There are many (non-clamav.net) urls I didn't address, especially in 3rd party or contrib code. 2018-04-02 07:58:33 -04:00
virusaction-test.sh unit_tests/virusaction-test.sh: ignore pathnames (bb#1274) 2008-11-05 18:25:02 +00:00