diff options
author | Arnstein Ressem <aressem@gmail.com> | 2016-08-23 15:10:36 +0200 |
---|---|---|
committer | Vegard Sjonfjell <vegardsjo@gmail.com> | 2016-08-23 15:10:36 +0200 |
commit | 55e5a91901109161186e05d3a6e959e06958bbba (patch) | |
tree | f312bab2c60207ee305dbcfa047fcc4fa8fd2dc1 /fsa | |
parent | d337a29392fb752dc725e4aea5efa0cc0df5f17a (diff) |
Aressem/cmake more out of source tests (#441)
* vespalib tests run out of source.
* staging_vespalib run tests out of source.
* fastos tests run out of source.
* Fixed storage tests out of source.
* Fixed some of the config tests.
* config* tests run out of source.
* document_* tests run out of source.
* documentapi_ tests run out of source.
* Fixed fsa out of source tests.
* Fix jrt_test out of source.
* More tests run out of source.
* Fix some slobrok and messagebus tests.
* More fixes for out of source tests.
* Done with first pass of regular tests out of source.
* Only use SOURCE_DIRECTORY in a limited set of places.
* Fix some remaining tests.
* Some cleanups.
* No need for extra slash.
Diffstat (limited to 'fsa')
-rw-r--r-- | fsa/src/alltest/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | fsa/src/alltest/alltest.sh | 16 | ||||
-rwxr-xr-x | fsa/src/alltest/detector_test.sh | 9 | ||||
-rwxr-xr-x | fsa/src/alltest/fsa_test.sh | 7 | ||||
-rwxr-xr-x | fsa/src/alltest/lookup_test.sh | 9 | ||||
-rwxr-xr-x | fsa/src/alltest/ngram_test.sh | 7 | ||||
-rwxr-xr-x | fsa/src/alltest/segmenter_test.sh | 9 | ||||
-rwxr-xr-x | fsa/src/alltest/vectorizer_test.sh | 9 |
8 files changed, 51 insertions, 17 deletions
diff --git a/fsa/src/alltest/CMakeLists.txt b/fsa/src/alltest/CMakeLists.txt index a2d99497499..f9cd36d1fe7 100644 --- a/fsa/src/alltest/CMakeLists.txt +++ b/fsa/src/alltest/CMakeLists.txt @@ -67,4 +67,4 @@ vespa_add_executable(fsa_vectorizer_perf_test_app TEST DEPENDS fsa ) -vespa_add_test(NAME fsa_vectorizer_perf_test_app NO_VALGRIND COMMAND sh alltest.sh) +vespa_add_test(NAME fsa_vectorizer_perf_test_app NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/alltest.sh) diff --git a/fsa/src/alltest/alltest.sh b/fsa/src/alltest/alltest.sh index 9225a9dafec..19f7b0f8681 100755 --- a/fsa/src/alltest/alltest.sh +++ b/fsa/src/alltest/alltest.sh @@ -1,18 +1,22 @@ #!/bin/bash set -e +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + # first create the FSA ./fsa_fsa_create_test_app # simple tests -./lookup_test.sh -./fsa_test.sh -./detector_test.sh +$SOURCE_DIRECTORY/lookup_test.sh +$SOURCE_DIRECTORY/fsa_test.sh +$SOURCE_DIRECTORY/detector_test.sh # advanced tests -./ngram_test.sh -./segmenter_test.sh -./vectorizer_test.sh +$SOURCE_DIRECTORY/ngram_test.sh +$SOURCE_DIRECTORY/segmenter_test.sh +$SOURCE_DIRECTORY/vectorizer_test.sh # manager test ./fsa_fsamanager_test_app . __testfsa__.__fsa__ diff --git a/fsa/src/alltest/detector_test.sh b/fsa/src/alltest/detector_test.sh index 73748a3382e..a712e313b0f 100755 --- a/fsa/src/alltest/detector_test.sh +++ b/fsa/src/alltest/detector_test.sh @@ -1,4 +1,9 @@ #!/bin/bash set -e -./fsa_detector_test_app < testinput.txt > detector_test.output -diff detector_test.output detector_test.out + +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + +./fsa_detector_test_app < $SOURCE_DIRECTORY/testinput.txt > detector_test.output +diff detector_test.output $SOURCE_DIRECTORY/detector_test.out diff --git a/fsa/src/alltest/fsa_test.sh b/fsa/src/alltest/fsa_test.sh index 09470044430..7969df745e8 100755 --- a/fsa/src/alltest/fsa_test.sh +++ b/fsa/src/alltest/fsa_test.sh @@ -1,4 +1,9 @@ #!/bin/bash set -e + +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + ./fsa_fsa_test_app > fsa_test.output -diff fsa_test.output fsa_test.out +diff fsa_test.output $SOURCE_DIRECTORY/fsa_test.out diff --git a/fsa/src/alltest/lookup_test.sh b/fsa/src/alltest/lookup_test.sh index 1732e21de65..2f633ea9c74 100755 --- a/fsa/src/alltest/lookup_test.sh +++ b/fsa/src/alltest/lookup_test.sh @@ -1,4 +1,9 @@ #!/bin/bash set -e -./fsa_lookup_test_app __testfsa__.__fsa__ < testinput.txt > lookup_test.output -diff lookup_test.output lookup_test.out + +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + +./fsa_lookup_test_app __testfsa__.__fsa__ < $SOURCE_DIRECTORY/testinput.txt > lookup_test.output +diff lookup_test.output $SOURCE_DIRECTORY/lookup_test.out diff --git a/fsa/src/alltest/ngram_test.sh b/fsa/src/alltest/ngram_test.sh index 6116737c5fa..cc3ccb83b0f 100755 --- a/fsa/src/alltest/ngram_test.sh +++ b/fsa/src/alltest/ngram_test.sh @@ -1,4 +1,9 @@ #!/bin/bash set -e + +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + ./fsa_ngram_test_app > ngram_test.output -diff ngram_test.output ngram_test.out +diff ngram_test.output $SOURCE_DIRECTORY/ngram_test.out diff --git a/fsa/src/alltest/segmenter_test.sh b/fsa/src/alltest/segmenter_test.sh index d5c84f6af34..5b8f73b30f8 100755 --- a/fsa/src/alltest/segmenter_test.sh +++ b/fsa/src/alltest/segmenter_test.sh @@ -1,4 +1,9 @@ #!/bin/bash set -e -./fsa_segmenter_test_app < testinput.txt > segmenter_test.output -diff segmenter_test.output segmenter_test.out + +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + +./fsa_segmenter_test_app < $SOURCE_DIRECTORY/testinput.txt > segmenter_test.output +diff segmenter_test.output $SOURCE_DIRECTORY/segmenter_test.out diff --git a/fsa/src/alltest/vectorizer_test.sh b/fsa/src/alltest/vectorizer_test.sh index f1d70397472..5e482935da1 100755 --- a/fsa/src/alltest/vectorizer_test.sh +++ b/fsa/src/alltest/vectorizer_test.sh @@ -1,4 +1,9 @@ #!/bin/bash set -e -./fsa_vectorizer_test_app < testinput.txt > vectorizer_test.output -diff vectorizer_test.output vectorizer_test.out + +if [ -z "$SOURCE_DIRECTORY" ]; then + SOURCE_DIRECTORY="." +fi + +./fsa_vectorizer_test_app < $SOURCE_DIRECTORY/testinput.txt > vectorizer_test.output +diff vectorizer_test.output $SOURCE_DIRECTORY/vectorizer_test.out |