add crop test on unix interface

parent acbf21c0
......@@ -82,3 +82,13 @@ SET_TESTS_PROPERTIES(comparator_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "
SET_TESTS_PROPERTIES(comparator_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME})
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME})
FIND_PROGRAM(SIKULI NAMES sikuli-ide)
IF(SIKULI)
IF(UNIX)
ADD_TEST(crop "${SIKULI}" -t testCrop.UNIX.sikuli)
ENDIF(UNIX)
ENDIF(SIKULI)
<html>
<head>
<style type="text/css">
.sikuli-code {
font-size: 20px;
font-family: "Osaka-mono", Monospace;
line-height: 1.5em;
display:table-cell;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */
}
.sikuli-code img {
vertical-align: middle;
margin: 2px;
border: 1px solid #ccc;
padding: 2px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 1px 1px 1px gray;
-webkit-box-shadow: 1px 1px 2px gray;
}
.kw {
color: blue;
}
.skw {
color: rgb(63, 127, 127);
}
.str {
color: rgb(128, 0, 0);
}
.dig {
color: rgb(128, 64, 0);
}
.cmt {
color: rgb(200, 0, 200);
}
h2 {
display: inline;
font-weight: normal;
}
.info {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
margin-bottom: 20px;
display: none;
}
a {
color: #9D2900;
}
body {
font-family: "Trebuchet MS", Arial, Sans-Serif;
}
</style>
</head>
<body>
<div class="info">
<h2>testCrop.sikuli</h2> <a href="testCrop.zip">(Download this script)</a>
</div>
<pre class="sikuli-code">
<span class="kw">def</span> setUp(self):
<span class="kw">import</span> os
ov_binany_path=os.environ[<span class="str">'OV_BINARY_PATH'</span>]
self.terminal = App.open(<span class="str">"xterm -e "</span> +
ov_binany_path +<span class="str">"/openvibe-designer.sh --no-session-management --play "</span> +
ov_binany_path +<span class="str">"/share/openvibe/scenarios/box-tutorials/crop.xml"</span>)
<span class="kw">while</span> <span class="kw">not</span> self.terminal.window():
<span class="skw">wait</span>(<span class="dig">1</span>)
<span class="kw">def</span> testRunOgreVisual(self):
<span class="kw">assert</span>(exists(<img src="timesignal.png" />))
<span class="kw">def</span> tearDown(self):
<span class="kw">if</span> self.terminal.window():
App.close(self.terminal)
self.terminal= None
</pre>
</body>
</html>
def setUp(self):
import os
ov_binany_path=os.environ['OV_BINARY_PATH']
self.terminal = App.open("xterm -e " +
ov_binany_path +"/openvibe-designer.sh --no-session-management --play " +
ov_binany_path +"/share/openvibe/scenarios/box-tutorials/crop.xml")
while not self.terminal.window():
wait(1)
def testRunOgreVisual(self):
assert(exists("timesignal.png"))
def tearDown(self):
if self.terminal.window():
App.close(self.terminal)
self.terminal= None
<html>
<head>
<style type="text/css">
.sikuli-code {
font-size: 20px;
font-family: "Osaka-mono", Monospace;
line-height: 1.5em;
display:table-cell;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */
}
.sikuli-code img {
vertical-align: middle;
margin: 2px;
border: 1px solid #ccc;
padding: 2px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 1px 1px 1px gray;
-webkit-box-shadow: 1px 1px 2px gray;
}
.kw {
color: blue;
}
.skw {
color: rgb(63, 127, 127);
}
.str {
color: rgb(128, 0, 0);
}
.dig {
color: rgb(128, 64, 0);
}
.cmt {
color: rgb(200, 0, 200);
}
h2 {
display: inline;
font-weight: normal;
}
.info {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
margin-bottom: 20px;
display: none;
}
a {
color: #9D2900;
}
body {
font-family: "Trebuchet MS", Arial, Sans-Serif;
}
</style>
</head>
<body>
<div class="info">
<h2>testCrop.sikuli</h2> <a href="testCrop.zip">(Download this script)</a>
</div>
<pre class="sikuli-code">
<span class="kw">def</span> setUp(self):
<span class="kw">import</span> os
ov_binany_path=os.environ[<span class="str">'OV_BINARY_PATH'</span>]
self.terminal = App.open(<span class="str">"xterm -e "</span> +
ov_binany_path +<span class="str">"/openvibe-designer.sh --no-session-management --play "</span> +
ov_binany_path +<span class="str">"/share/openvibe/scenarios/box-tutorials/crop.xml"</span>)
<span class="kw">while</span> <span class="kw">not</span> self.terminal.window():
<span class="skw">wait</span>(<span class="dig">1</span>)
<span class="kw">def</span> testRunOgreVisual(self):
<span class="kw">assert</span>(exists(<img src="timesignal.png" />))
<span class="kw">def</span> tearDown(self):
<span class="kw">if</span> self.terminal.window():
App.close(self.terminal)
self.terminal= None
</pre>
</body>
</html>
def setUp(self):
import os
ov_binany_path=os.environ['OV_BINARY_PATH']
self.terminal = App.open("xterm -e " +
ov_binany_path +"/openvibe-designer.sh --no-session-management --play " +
ov_binany_path +"/share/openvibe/scenarios/box-tutorials/crop.xml")
while not self.terminal.window():
wait(1)
def testRunOgreVisual(self):
assert(exists("timesignal.png"))
def tearDown(self):
if self.terminal.window():
App.close(self.terminal)
self.terminal= None
<html>
<head>
<style type="text/css">
.sikuli-code {
font-size: 20px;
font-family: "Osaka-mono", Monospace;
line-height: 1.5em;
display:table-cell;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */
}
.sikuli-code img {
vertical-align: middle;
margin: 2px;
border: 1px solid #ccc;
padding: 2px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 1px 1px 1px gray;
-webkit-box-shadow: 1px 1px 2px gray;
}
.kw {
color: blue;
}
.skw {
color: rgb(63, 127, 127);
}
.str {
color: rgb(128, 0, 0);
}
.dig {
color: rgb(128, 64, 0);
}
.cmt {
color: rgb(200, 0, 200);
}
h2 {
display: inline;
font-weight: normal;
}
.info {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
margin-bottom: 20px;
display: none;
}
a {
color: #9D2900;
}
body {
font-family: "Trebuchet MS", Arial, Sans-Serif;
}
</style>
</head>
<body>
<div class="info">
<h2>testCrop.sikuli</h2> <a href="testCrop.zip">(Download this script)</a>
</div>
<pre class="sikuli-code">
<span class="kw">def</span> setUp(self):
<span class="kw">import</span> os
ov_binany_path=os.environ[<span class="str">'OV_BINARY_PATH'</span>]
self.terminal = App.open(<span class="str">"xterm -e "</span> + ov_binany_path +<span class="str">"/openvibe-designer.sh --no-session-management --play testOgreContext.xml"</span>)
<span class="kw">while</span> <span class="kw">not</span> self.terminal.window():
<span class="skw">wait</span>(<span class="dig">1</span>)
<span class="skw">wait</span>(<img src="Simple3Dview.png" />,<span class="dig">10</span>)
<span class="kw">def</span> testRunOgreVisual(self):
waitVanish(<img src="Simple3Dview.png" />,<span class="dig">10</span>)
<span class="kw">assert</span>(exists(<img src="designerScreen.png" />))
<span class="kw">def</span> tearDown(self):
<span class="kw">if</span> self.terminal.window():
App.close(self.terminal)
self.terminal= None
</pre>
</body>
</html>
def setUp(self):
import os
ov_binany_path=os.environ['OV_BINARY_PATH']
self.terminal = App.open("xterm -e " + ov_binany_path +"/openvibe-designer.sh --no-session-management --play testOgreContext.xml")
while not self.terminal.window():
wait(1)
wait("Simple3Dview.png",10)
def testRunOgreVisual(self):
waitVanish("Simple3Dview.png",10)
assert(exists("designerScreen.png"))
def tearDown(self):
if self.terminal.window():
App.close(self.terminal)
self.terminal= None
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