diff options
author | Thomas White <taw@physics.org> | 2018-06-25 16:23:21 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-06-25 16:23:21 +0200 |
commit | ec5cf28c70480540d7dd4dd36ea27643e5fa53ed (patch) | |
tree | d652341e3c12cff99014de0e4650816c83e297cc /tests | |
parent | 4ec097a154351883f5c3d0a8275c7d941da4d81a (diff) |
Test the compiled binaries, not the installed ones
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 21 | ||||
-rwxr-xr-x | tests/first_merge_check | 4 | ||||
-rwxr-xr-x | tests/fourth_merge_check | 4 | ||||
-rwxr-xr-x | tests/partialator_merge_check_1 | 10 | ||||
-rwxr-xr-x | tests/partialator_merge_check_2 | 10 | ||||
-rwxr-xr-x | tests/partialator_merge_check_3 | 10 | ||||
-rwxr-xr-x | tests/second_merge_check | 4 | ||||
-rwxr-xr-x | tests/third_merge_check | 4 |
8 files changed, 44 insertions, 23 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1fa8012a..e98c3202 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,10 +1,17 @@ -add_test(first_merge_check ${CMAKE_CURRENT_SOURCE_DIR}/first_merge_check) -add_test(second_merge_check ${CMAKE_CURRENT_SOURCE_DIR}/second_merge_check) -add_test(third_merge_check ${CMAKE_CURRENT_SOURCE_DIR}/third_merge_check) -add_test(fourth_merge_check ${CMAKE_CURRENT_SOURCE_DIR}/fourth_merge_check) -add_test(partialator_merge_check_1 ${CMAKE_CURRENT_SOURCE_DIR}/partialator_merge_check_1) -add_test(partialator_merge_check_2 ${CMAKE_CURRENT_SOURCE_DIR}/partialator_merge_check_2) -add_test(partialator_merge_check_3 ${CMAKE_CURRENT_SOURCE_DIR}/partialator_merge_check_3) +add_test(NAME first_merge_check + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/first_merge_check $<TARGET_FILE:process_hkl>) +add_test(NAME second_merge_check + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/second_merge_check $<TARGET_FILE:process_hkl>) +add_test(NAME third_merge_check + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/third_merge_check $<TARGET_FILE:process_hkl>) +add_test(NAME fourth_merge_check + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/fourth_merge_check $<TARGET_FILE:process_hkl>) +add_test(NAME partialator_merge_check_1 + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/partialator_merge_check_1 $<TARGET_FILE:partialator>) +add_test(NAME partialator_merge_check_2 + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/partialator_merge_check_2 $<TARGET_FILE:partialator>) +add_test(NAME partialator_merge_check_3 + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/partialator_merge_check_3 $<TARGET_FILE:partialator>) add_executable(ambi_check ambi_check.c) target_include_directories(ambi_check PRIVATE ${COMMON_INCLUDES}) diff --git a/tests/first_merge_check b/tests/first_merge_check index 3b1cd60f..6ac8396a 100755 --- a/tests/first_merge_check +++ b/tests/first_merge_check @@ -1,5 +1,7 @@ #!/bin/sh +PROCESS_HKL=$1 + cat > first_merge_check.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -41,7 +43,7 @@ Symmetry: 1 1 0 0 150.00 - 35.36 2 EOF -process_hkl -i first_merge_check.stream -o first_merge_check.hkl --no-polarisation +$PROCESS_HKL -i first_merge_check.stream -o first_merge_check.hkl --no-polarisation if [ $? -ne 0 ]; then exit 1; fi diff --git a/tests/fourth_merge_check b/tests/fourth_merge_check index e55f020c..67c87e86 100755 --- a/tests/fourth_merge_check +++ b/tests/fourth_merge_check @@ -1,5 +1,7 @@ #!/bin/sh +PROCESS_HKL=$1 + cat > fourth_merge_check.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -25,7 +27,7 @@ Symmetry: 1 h k l I phase sigma(I) nmeas EOF -process_hkl -i fourth_merge_check.stream -o fourth_merge_check.hkl --no-polarisation +$PROCESS_HKL -i fourth_merge_check.stream -o fourth_merge_check.hkl --no-polarisation if [ $? -ne 0 ]; then exit 1; fi diff --git a/tests/partialator_merge_check_1 b/tests/partialator_merge_check_1 index d59d128f..616ccf31 100755 --- a/tests/partialator_merge_check_1 +++ b/tests/partialator_merge_check_1 @@ -1,5 +1,7 @@ #!/bin/sh +PARTIALATOR=$1 + cat > partialator_merge_check_1.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -42,10 +44,10 @@ Symmetry: 1 1 0 0 150.00 - 35.36 2 EOF -partialator -i partialator_merge_check_1.stream \ - -o partialator_merge_check_1.hkl \ - --model=unity --iterations=0 --no-scale --no-polarisation \ - --no-logs --no-free +$PARTIALATOR -i partialator_merge_check_1.stream \ + -o partialator_merge_check_1.hkl \ + --model=unity --iterations=0 --no-scale --no-polarisation \ + --no-logs --no-free if [ $? -ne 0 ]; then exit 1 fi diff --git a/tests/partialator_merge_check_2 b/tests/partialator_merge_check_2 index 2eabc300..a8ff3ddd 100755 --- a/tests/partialator_merge_check_2 +++ b/tests/partialator_merge_check_2 @@ -1,5 +1,7 @@ #!/bin/sh +PARTIALATOR=$1 + cat > partialator_merge_check_2.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -46,10 +48,10 @@ Symmetry: 1 19 0 0 75.00 - 0.00 2 EOF -partialator -i partialator_merge_check_2.stream \ - -o partialator_merge_check_2.hkl \ - --model=unity --iterations=1 --no-polarisation \ - --no-free --no-logs +$PARTIALATOR -i partialator_merge_check_2.stream \ + -o partialator_merge_check_2.hkl \ + --model=unity --iterations=1 --no-polarisation \ + --no-free --no-logs if [ $? -ne 0 ]; then exit 1 fi diff --git a/tests/partialator_merge_check_3 b/tests/partialator_merge_check_3 index 25f95756..933422b0 100755 --- a/tests/partialator_merge_check_3 +++ b/tests/partialator_merge_check_3 @@ -1,5 +1,7 @@ #!/bin/sh +PARTIALATOR=$1 + cat > partialator_merge_check_3.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -48,10 +50,10 @@ Symmetry: 4 20 0 0 75.00 - 0.00 2 EOF -partialator -i partialator_merge_check_3.stream \ - -o partialator_merge_check_3.hkl \ - --model=unity --iterations=1 -y 4 --no-polarisation \ - --no-free --no-logs +$PARTIALATOR -i partialator_merge_check_3.stream \ + -o partialator_merge_check_3.hkl \ + --model=unity --iterations=1 -y 4 --no-polarisation \ + --no-free --no-logs if [ $? -ne 0 ]; then exit 1 fi diff --git a/tests/second_merge_check b/tests/second_merge_check index 7a5c6134..3ef9fc50 100755 --- a/tests/second_merge_check +++ b/tests/second_merge_check @@ -1,5 +1,7 @@ #!/bin/sh +PROCESS_HKL=$1 + cat > second_merge_check.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -41,7 +43,7 @@ Symmetry: -1 1 0 0 150.00 - 35.36 2 EOF -process_hkl -y -1 -i second_merge_check.stream -o second_merge_check.hkl --no-polarisation +$PROCESS_HKL -y -1 -i second_merge_check.stream -o second_merge_check.hkl --no-polarisation if [ $? -ne 0 ]; then exit 1; fi diff --git a/tests/third_merge_check b/tests/third_merge_check index da6cc9e2..9ebb9f85 100755 --- a/tests/third_merge_check +++ b/tests/third_merge_check @@ -1,5 +1,7 @@ #!/bin/sh +PROCESS_HKL=$1 + cat > third_merge_check.stream << EOF CrystFEL stream format 2.1 Command line: indexamajig -i dummy.lst -o dummy.stream --kraken=prawn @@ -56,7 +58,7 @@ Symmetry: 1 1 0 0 133.33 - 27.22 3 EOF -process_hkl -i third_merge_check.stream -o third_merge_check.hkl --no-polarisation +$PROCESS_HKL -i third_merge_check.stream -o third_merge_check.hkl --no-polarisation if [ $? -ne 0 ]; then exit 1; fi |