Skip to content

Commit

Permalink
hscollider: example test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
coytea authored and xiangwang1 committed Jan 19, 2018
1 parent 934d6f2 commit 905a673
Show file tree
Hide file tree
Showing 57 changed files with 21,058 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ bin

# sigs dir is handled externally
signatures
# but not the regression tests
!tools/hscollider/test_cases/signatures

# ignore pcre symlink if it exists
pcre
Expand Down
18 changes: 18 additions & 0 deletions tools/hscollider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,21 @@ else() # WIN32
target_link_libraries(hscollider hs ${PCRE_LDFLAGS} databaseutil
expressionutil corpusomatic crosscompileutil)
endif()

add_custom_target(
collide_quick_test
COMMAND ${CMAKE_BINARY_DIR}/bin/hscollider
-s ${CMAKE_SOURCE_DIR}/tools/hscollider/test_cases/signatures/collider_tests.txt
-c ${CMAKE_SOURCE_DIR}/tools/hscollider/test_cases/corpora/*
-Z0 -t3
DEPENDS hscollider
)

add_custom_target(
collide_quick_test_block
COMMAND ${CMAKE_BINARY_DIR}/bin/hscollider
-s ${CMAKE_SOURCE_DIR}/tools/hscollider/test_cases/signatures/collider_tests.txt
-c ${CMAKE_SOURCE_DIR}/tools/hscollider/test_cases/corpora/*
-Z0
DEPENDS hscollider
)
3 changes: 3 additions & 0 deletions tools/hscollider/test_cases/corpora/accel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2000:abcdefxxxxxxxxxxxxxxxxxxxxxxxxxxAfoobarxxxxxxxxxxxxxx
2001:/w------Ue0-J-vNU-----C9---k--M---1S-x-----g-----A---\n
2002:mJpPthD\xf0\x95\x93\xa1hq\xf4\x8b\xb9\x9cbrp\xe2\x84\xaahB\xee\x80\x80\xee\x80\x80\xee\x80\x80\xee\x80\x80\xe8\x86\x95\xee\x80\x80\xee\x80\x80\xee\x80\x80\xee\x80\x80\xee\x80\x80\xee\x80\x80\xee\x80\x80\xee\x80\x80
Loading

0 comments on commit 905a673

Please sign in to comment.