forked from meta-toolkit/meta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
150 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
message(STATUS "Setting up biicode block...") | ||
set(UNIT_TEST_EXE skystrife_meta_src_test_tools_unit-test) | ||
include(src/test/unit_tests.cmake) | ||
ADD_BIICODE_TARGETS() | ||
target_link_libraries(${BII_LIB_TARGET} PUBLIC meta-definitions | ||
${ICU_LIBRARIES} | ||
${ZLIB_LIBRARIES} | ||
${CMAKE_THREAD_LIB_INIT}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Biicode Integration | ||
MeTA can be built using biicode. To do so, symlink the biicode.conf file to | ||
the project's root directory like so (from the project root): | ||
|
||
```bash | ||
ln -s contrib/biicode/biicode.conf . | ||
``` | ||
|
||
Then, configure and build with the following: | ||
|
||
```bash | ||
bii init -L | ||
bii configure | ||
bii build | ||
``` | ||
|
||
After placing the sample config.toml in the `bin/` directory, you can run | ||
the unit tests: | ||
|
||
```bash | ||
bii test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Biicode configuration file | ||
|
||
[requirements] | ||
skystrife/cpptoml: 0 | ||
|
||
[parent] | ||
# The parent version of this block. Must match folder name. E.g. | ||
# user/block # No version number means not published yet | ||
# You can change it to publish to a different track, and change version, e.g. | ||
# user/block(track): 7 | ||
|
||
[paths] | ||
# Local directories to look for headers (within block) | ||
# / | ||
include | ||
# should put porter2_stemmer on biicode as well... | ||
deps/porter2_stemmer | ||
|
||
[dependencies] | ||
# Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=) | ||
# hello.h + hello_imp.cpp hello_imp2.cpp | ||
# *.h + *.cpp | ||
include/analyzers/* + src/analyzers/* src/corpus/* | ||
include/classify/* + src/classify/* src/index/* | ||
include/corpus/* + src/corpus/* src/io/* | ||
include/index/* + src/index/* src/analyzers/* | ||
include/io/* + src/io/* src/util/* | ||
include/lm/* + src/lm/* src/corpus/* | ||
include/parser/* + src/parser/* src/io/* src/sequence/* src/util/* | ||
include/sequence/* + src/sequence/* src/io/* src/utf/* | ||
include/topics/* + src/topics/* src/index/* | ||
|
||
[mains] | ||
# Manual adjust of files that define an executable | ||
# !main.cpp # Do not build executable from this file | ||
# main2.cpp # Build it (it doesnt have a main() function, but maybe it includes it) | ||
!deps/* | ||
|
||
[tests] | ||
# Manual adjust of files that define a CTest test | ||
# test/* pattern to evaluate this test/ folder sources like tests | ||
|
||
[hooks] | ||
# These are defined equal to [dependencies],files names matching bii*stage*hook.py | ||
# will be launched as python scripts at stage = {post_process, clean} | ||
# CMakeLists.txt + bii/my_post_process1_hook.py bii_clean_hook.py | ||
|
||
[includes] | ||
# Mapping of include patterns to external blocks | ||
# hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h | ||
cpptoml.h: skystrife/cpptoml/include | ||
|
||
[data] | ||
# Manually define data files dependencies, that will be copied to bin for execution | ||
# By default they are copied to bin/user/block/... which should be taken into account | ||
# when loading from disk such data | ||
# image.cpp + image.jpg # code should write open("user/block/image.jpg") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
add_test(analyzers ${UNIT_TEST_EXE} analyzers) | ||
set_tests_properties(analyzers PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(stemmers ${UNIT_TEST_EXE} stemmers) | ||
set_tests_properties(stemmers PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(parallel ${UNIT_TEST_EXE} parallel) | ||
set_tests_properties(parallel PROPERTIES TIMEOUT 30 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(inverted-index ${UNIT_TEST_EXE} inverted-index) | ||
set_tests_properties(inverted-index PROPERTIES TIMEOUT 30 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(forward-index ${UNIT_TEST_EXE} forward-index) | ||
set_tests_properties(forward-index PROPERTIES TIMEOUT 30 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(string-list ${UNIT_TEST_EXE} string-list) | ||
set_tests_properties(string-list PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(vocabulary-map ${UNIT_TEST_EXE} vocabulary-map) | ||
set_tests_properties(vocabulary-map PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(libsvm-parser ${UNIT_TEST_EXE} libsvm-parser) | ||
set_tests_properties(libsvm-parser PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(classifiers ${UNIT_TEST_EXE} classifiers) | ||
set_tests_properties(classifiers PROPERTIES TIMEOUT 80 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(rankers ${UNIT_TEST_EXE} rankers) | ||
set_tests_properties(rankers PROPERTIES TIMEOUT 75 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(ir-eval ${UNIT_TEST_EXE} ir-eval) | ||
set_tests_properties(ir-eval PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(compression ${UNIT_TEST_EXE} compression) | ||
set_tests_properties(compression PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(graph ${UNIT_TEST_EXE} graph) | ||
set_tests_properties(graph PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
|
||
add_test(parser ${UNIT_TEST_EXE} parser) | ||
set_tests_properties(parser PROPERTIES TIMEOUT 10 WORKING_DIRECTORY | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) |