Commit 0a578aa6 authored by Serrière Guillaume's avatar Serrière Guillaume

Attempt to put screenshot in Sikuli failed.

Signed-off-by: default avatarSerrière Guillaume <guillaume.serriere@inria.fr>
parent 4d8ecbb6
......@@ -38,6 +38,10 @@ SET_TESTS_PROPERTIES(compare_Evaluation_statistic_generator PROPERTIES ATTACHED_
FIND_PROGRAM(SIKULI NAMES sikuli-ide)
IF(SIKULI)
IF(UNIX)
ADD_TEST(clean_Evaluation_ROC rm -f ${OV_LOGFILE} screenshot.png)
ADD_TEST(run_Evaluation_ROC "${SIKULI}" -t testROCCurve.UNIX.sikuli)
SET_TESTS_PROPERTIES(run_Evaluation_ROC PROPERTIES DEPENDS clean_Evaluation_ROC)
SET_TESTS_PROPERTIES(run_Evaluation_ROC PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE} screenshot.png)
ENDIF(UNIX)
ENDIF(SIKULI)
\ No newline at end of file
def setUp(self):
import os
import shutil
ov_binany_path=os.environ['OV_BINARY_PATH']
self.terminal = App.open("xterm -e " + ov_binany_path +"/openvibe-designer.sh --no-session-management --play-fast Test_ROCCurve.xml")
while not self.terminal.window():
wait(1)
#def takepicture:
#dir = os.path.dirname(getBundlePath()) # the folder, where your script is stored
#img = capture(SCREEN) # snapshots the screen
#shutil.move(img, os.path.join(dir, "shot.png"))
def testROCCurve(self):
wait("ROCCurveResult.png",10)
assert(exists("ROCCurveResult.png"))
import os
import shutil
try:
wait("ROCCurveResult.png",10)
assert(exists("ROCCurveResult.png"))
except (FindFailed, AssertionError):
print "Unable to find the required png"
dir = os.path.dirname(getBundlePath()) # the folder, where your script is stored
img = capture(SCREEN) # snapshots the screen
shutil.move(img, os.path.join(dir, "screenshot.png"))
raise
def tearDown(self):
self.terminal.close()
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