Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusaa committed Oct 14, 2022
1 parent 451cc25 commit 62c81ee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ target_compile_definitions(check_clamav PUBLIC OBJDIR="${OBJDIR}" SRCDIR="${SRCD
ADD_CUSTOM_COMMAND(TARGET check_clamav POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/input/clamav.hdb ${CMAKE_CURRENT_BINARY_DIR}/input/.)
ADD_CUSTOM_COMMAND(TARGET check_clamav POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/input/clamav.other.hdb ${CMAKE_CURRENT_BINARY_DIR}/input/.)
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/input/clamav.vs.hdb ${CMAKE_CURRENT_BINARY_DIR}/input/.)

#
# Paths to pass to our tests via environment variables
Expand Down
6 changes: 3 additions & 3 deletions unit_tests/clamscan_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setUpClass(cls):
)

shutil.copy(
str(TC.path_build / 'unit_tests' / 'input' / 'clamav.other.hdb'),
str(TC.path_build / 'unit_tests' / 'input' / 'clamav.vs.hdb'),
str(TC.path_db),
)

Expand Down Expand Up @@ -793,14 +793,14 @@ def test_clamscan_19_velvetsweatshop_detection(self):
testfiles = ' '.join([str(testpath) for testpath in vsTestPaths])

command = '{valgrind} {valgrind_args} {clamscan} -d {path_db} {testfiles}'.format(
valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, clamscan=TC.clamscan, path_db=TC.path_db / "clamav.other.hdb", testfiles=testfiles,
valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, clamscan=TC.clamscan, path_db=TC.path_db / "clamav.vs.hdb", testfiles=testfiles,
)

output = self.execute_command(command)

assert output.ec == 1 # virus found

expected_results = ['{}: ClamAV-Test-File2.UNOFFICIAL FOUND'.format(testpath.name) for testpath in vsTestPaths]
expected_results = ['{}: ClamAV-VelvetSweatshop-Test-File2.UNOFFICIAL FOUND'.format(testpath.name) for testpath in vsTestPaths]
expected_results.append('Scanned files: {}'.format(len(vsTestPaths)))
expected_results.append('Infected files: {}'.format(len(vsTestPaths)))

Expand Down
1 change: 0 additions & 1 deletion unit_tests/input/clamav.other.hdb

This file was deleted.

1 change: 1 addition & 0 deletions unit_tests/input/clamav.vs.hdb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a7acff7aba1a40f293b17f06eac1a8288c0d706d:74436:ClamAV-VelvetSweatshop-Test-File2

0 comments on commit 62c81ee

Please sign in to comment.