Commit dd555f6b authored by Serrière Guillaume's avatar Serrière Guillaume

Add Automatic test for statistic generator.

Signed-off-by: default avatarSerrière Guillaume <guillaume.serriere@inria.fr>
parent 41f95f22
......@@ -12,21 +12,24 @@ ELSE(WIN32)
SET(OV_LOGFILE "$ENV{HOME}/.config/openvibe/log/openvibe-designer.log")
ENDIF(WIN32)
SET(TEST_SCENARIOS LDA-OneVsOne-HT-Test LDA-OneVsOne-PKPD-Test LDA-OneVsOne-Voting-Test LDA-OneVsAll-Test sLDA-OneVsOne-HT-Test sLDA-OneVsOne-PKPD-Test sLDA-OneVsOne-Voting-Test sLDA-OneVsAll-Test SVM-Native-Test SVM-OneVsOne-Voting-Test SVM-OneVsOne-HT-Test SVM-OneVsOne-PKPD-Test SVM-OneVsAll-Test MLP-Native-Test MLP-OneVsOne-Voting-Test MLP-OneVsOne-HT-Test MLP-OneVsOne-PKPD-Test MLP-OneVsAll-Test)
ADD_TEST(clean_Evaluation-kappa rm -f ${OV_LOGFILE})
ADD_TEST(run_Evaluation-kappa "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--no-session-management" "--config" "$ENV{OV_BINARY_PATH}/share/openvibe/kernel/openvibe_test.conf" "--play-fast" Test-kappa.xml)
ADD_TEST(compare_Evaluation_${TEST_NAME} "$ENV{OV_BINARY_PATH}/test_evaluation.${EXT}" "${OS_FLAGS}" "${OV_LOGFILE}")
ADD_TEST(clean_Evaluation_kappa rm -f ${OV_LOGFILE})
ADD_TEST(run_Evaluation_kappa "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--no-session-management" "--config" "$ENV{OV_BINARY_PATH}/share/openvibe/kernel/openvibe_test.conf" "--play-fast" Test-kappa.xml)
ADD_TEST(compare_Evaluation_kappa "$ENV{OV_BINARY_PATH}/test_evaluation.${EXT}" "${OS_FLAGS}" "${OV_LOGFILE}")
# It would be better to clean last, but we can't do this as it will delete the
# output we wish to include, and we can't prevent clean from running if a prev. test fails
# We need the clean to be sure that the comparator stage is not getting data from a previous run.
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME})
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(run_Evaluation_kappa PROPERTIES DEPENDS clean_Evaluation_kappa)
SET_TESTS_PROPERTIES(run_Evaluation_kappa PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_Evaluation_kappa PROPERTIES DEPENDS run_Evaluation_kappa)
SET_TESTS_PROPERTIES(compare_Evaluation_kappa PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
SET_TESTS_PROPERTIES(compare_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
ADD_TEST(run_Evaluation_statistic_generator "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--no-session-management" "--config" "$ENV{OV_BINARY_PATH}/share/openvibe/kernel/openvibe_test.conf" "--play-fast" Test-StatisticGenerator.xml)
ADD_TEST(compare_Evaluation_statistic_generator "diff" "stat.xml" "data/Statistic_comparison.xml")
ADD_TEST(clean_Evaluation_statistic_generator rm -f stat.xml)
SET_TESTS_PROPERTIES(compare_Evaluation_statistic_generator PROPERTIES DEPENDS run_Evaluation_statistic_generator)
SET_TESTS_PROPERTIES(compare_Evaluation_statistic_generator PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
This diff is collapsed.
<Statistic>
<Stimulations-list>
<Stimulation>
<Identifier>(0x00000000, 0x00008100)</Identifier>
<Label>OVTK_StimulationId_Label_00</Label>
<Count>500</Count>
</Stimulation>
</Stimulations-list>
<Channel-list>
<Channel>
<Name>sinusOsc 1</Name>
<Maximum>2.99595</Maximum>
<Minimum>-2.99582</Minimum>
<Mean>0.00374409</Mean>
</Channel>
<Channel>
<Name>sinusOsc 2</Name>
<Maximum>2.99555</Maximum>
<Minimum>-2.99594</Minimum>
<Mean>0.00215169</Mean>
</Channel>
<Channel>
<Name>sinusOsc 3</Name>
<Maximum>2.99594</Maximum>
<Minimum>-2.99592</Minimum>
<Mean>0.000474523</Mean>
</Channel>
<Channel>
<Name>sinusOsc 4</Name>
<Maximum>2.99591</Maximum>
<Minimum>-2.99594</Minimum>
<Mean>0.00127219</Mean>
</Channel>
</Channel-list>
</Statistic>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment