Split basic test interface in two tests to avoid some failed test on CI

Fix profile options in linux building
Add automatic stop on Serial400Box Scenario
parent 73e190df
......@@ -19,6 +19,7 @@ FIND_PROGRAM(SIKULI NAMES sikuli-ide)
IF(SIKULI)
IF(UNIX)
ADD_TEST(basic_interface_designer "${SIKULI}" -t testStartInterface.UNIX.sikuli)
ADD_TEST(boxSetAttribute "${SIKULI}" -t testBoxSetAttribute.UNIX.sikuli)
ADD_TEST(DrawPerformance3Boxes_designer "${SIKULI}" -t testDrawPerformance3boxes.UNIX.sikuli)
ADD_TEST(DrawPerformance400Boxes_designer "${SIKULI}" -t testDrawPerformance400boxes.UNIX.sikuli)
ENDIF(UNIX)
......
<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>testStartInterface.UNIX.sikuli</h2> <a href="testStartInterface.UNIX.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"</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="StartInterface.png" />,<span class="dig">10</span>)
<span class="kw">def</span> test_boxSetAttributes(self):
<span class="skw">click</span>(<img src="SearchBoxBar.png" />)
paste(<span class="str">"sinus"</span>)
<span class="skw">dragDrop</span>(<img src="Sinusoscilla-1.png" />,Pattern(<img src="DesignerDataGenOpen.png" />).similar(<span class="dig">0.40</span>).targetOffset(-<span class="dig">233</span>,-<span class="dig">163</span>))
<span class="skw">rightClick</span>(<img src="SinusOscillatorBoxSelected.png" />)
<span class="skw">click</span>(Pattern(<img src="contextualBoxMenu.png" />).targetOffset(-<span class="dig">51</span>,<span class="dig">16</span>))
<span class="kw">assert</span>(exists(<img src="renameBoxPopUp.png" />))
<span class="skw">type</span>(<span class="str">"XXXX XXXX XXXX"</span>+ Key.ENTER)
<span class="kw">assert</span>(exists(<img src="SinusOscillatorNewNameXXX.png" />))
<span class="kw">def</span> tearDown(self):
App.close(self.terminal)
self.terminal= None
<span class="skw">wait</span>(<span class="dig">2</span>)
</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")
while not self.terminal.window():
wait(1)
wait("StartInterface.png",10)
def test_boxSetAttributes(self):
click("SearchBoxBar.png")
paste("sinus")
dragDrop("Sinusoscilla-1.png",Pattern("DesignerDataGenOpen.png").similar(0.40).targetOffset(-233,-163))
rightClick("SinusOscillatorBoxSelected.png")
click(Pattern("contextualBoxMenu.png").targetOffset(-51,16))
assert(exists("renameBoxPopUp.png"))
type("XXXX XXXX XXXX"+ Key.ENTER)
assert(exists("SinusOscillatorNewNameXXX.png"))
def tearDown(self):
App.close(self.terminal)
self.terminal= None
wait(2)
<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>testStartInterface.UNIX.sikuli</h2> <a href="testStartInterface.UNIX.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"</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="StartInterface.png" />,<span class="dig">10</span>)
<span class="kw">def</span> test_createSimpleScenarioAndRun(self):
<span class="skw">click</span>(Pattern(<img src="Datagenerati.png" />).targetOffset(-<span class="dig">70</span>,-<span class="dig">1</span>))
<span class="skw">dragDrop</span>(<img src="Sinusoscilla-1.png" />,Pattern(<img src="DesignerDataGenOpen.png" />).targetOffset(-<span class="dig">233</span>,-<span class="dig">163</span>))
<span class="kw">assert</span>(exists(<img src="SinusOscillatorBoxSelected.png" />))
<span class="skw">click</span>(Pattern(<img src="Visualisatio.png" />).targetOffset(-<span class="dig">62</span>,<span class="dig">0</span>))
<span class="skw">click</span>(Pattern(<img src="Basic.png" />).targetOffset(-<span class="dig">50</span>,-<span class="dig">1</span>))
<span class="skw">dragDrop</span>(<img src="Signaldisplay.png" />, Pattern(<img src="designerSinusGenPlaced.png" />).targetOffset(-<span class="dig">197</span>,-<span class="dig">16</span>))
<span class="kw">assert</span>(exists(<img src="SignalDisplayBoxSelected.png" />))
<span class="skw">dragDrop</span>(<img src="outputSignalConnector.png" />, <img src="imputSingnalConnector.png" />)
<span class="skw">click</span>(Pattern(<img src="playButton.png" />).similar(<span class="dig">0.95</span>))
<span class="skw">wait</span>(<span class="dig">6</span>)
<span class="kw">assert</span>(exists(Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.46</span>)))
<span class="skw">dragDrop</span>(Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.46</span>).targetOffset(<span class="dig">2</span>,-<span class="dig">157</span>),Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.46</span>).targetOffset(-<span class="dig">102</span>,<span class="dig">137</span>))
<span class="skw">click</span>(<img src="stopButton.png" />)
waitVanish(Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.58</span>))
<span class="skw">type</span>(<span class="str">"w"</span>,KeyModifier.CTRL)
<span class="kw">assert</span>(exists(<img src="SavechangePopup.png" />))
<span class="skw">click</span>(Pattern(<img src="SavechangePopup.png" />).targetOffset(-<span class="dig">170</span>,<span class="dig">56</span>))
waitVanish(Pattern(<img src="SavechangePopup.png" />).targetOffset(-<span class="dig">170</span>,<span class="dig">56</span>))
<span class="kw">def</span> test_boxSetAtributes(self):
<span class="skw">click</span>(<img src="SearchBoxBar.png" />)
paste(<span class="str">"sinus"</span>)
<span class="skw">dragDrop</span>(<img src="Sinusoscilla-1.png" />,Pattern(<img src="DesignerDataGenOpen.png" />).similar(<span class="dig">0.40</span>).targetOffset(-<span class="dig">233</span>,-<span class="dig">163</span>))
<span class="skw">rightClick</span>(<img src="SinusOscillatorBoxSelected.png" />)
<span class="skw">click</span>(Pattern(<img src="contextualBoxMenu.png" />).targetOffset(-<span class="dig">51</span>,<span class="dig">16</span>))
<span class="kw">assert</span>(exists(<img src="renameBoxPopUp.png" />))
<span class="skw">type</span>(<span class="str">"XXXX XXXX XXXX"</span>+ Key.ENTER)
<span class="kw">assert</span>(exists(<img src="SinusOscillatorNewNameXXX.png" />))
<span class="kw">def</span> tearDown(self):
App.close(self.terminal)
self.terminal= None
<span class="skw">wait</span>(<span class="dig">2</span>)
</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")
while not self.terminal.window():
wait(1)
wait("StartInterface.png",10)
def test_createSimpleScenarioAndRun(self):
click(Pattern("Datagenerati.png").targetOffset(-70,-1))
dragDrop("Sinusoscilla-1.png",Pattern("DesignerDataGenOpen.png").targetOffset(-233,-163))
assert(exists("SinusOscillatorBoxSelected.png"))
click(Pattern("Visualisatio.png").targetOffset(-62,0))
click(Pattern("Basic.png").targetOffset(-50,-1))
dragDrop("Signaldisplay.png", Pattern("designerSinusGenPlaced.png").targetOffset(-197,-16))
assert(exists("SignalDisplayBoxSelected.png"))
dragDrop("outputSignalConnector.png", "imputSingnalConnector.png")
click(Pattern("playButton.png").similar(0.95))
wait(6)
assert(exists(Pattern("SignalDisplayWindow.png").similar(0.46)))
dragDrop(Pattern("SignalDisplayWindow.png").similar(0.46).targetOffset(2,-157),Pattern("SignalDisplayWindow.png").similar(0.46).targetOffset(-102,137))
click("stopButton.png")
waitVanish(Pattern("SignalDisplayWindow.png").similar(0.58))
type("w",KeyModifier.CTRL)
assert(exists("SavechangePopup.png"))
click(Pattern("SavechangePopup.png").targetOffset(-170,56))
waitVanish(Pattern("SavechangePopup.png").targetOffset(-170,56))
def test_boxSetAtributes(self):
click("SearchBoxBar.png")
paste("sinus")
dragDrop("Sinusoscilla-1.png",Pattern("DesignerDataGenOpen.png").similar(0.40).targetOffset(-233,-163))
rightClick("SinusOscillatorBoxSelected.png")
click(Pattern("contextualBoxMenu.png").targetOffset(-51,16))
assert(exists("renameBoxPopUp.png"))
type("XXXX XXXX XXXX"+ Key.ENTER)
assert(exists("SinusOscillatorNewNameXXX.png"))
def tearDown(self):
App.close(self.terminal)
self.terminal= None
wait(2)
......@@ -95,15 +95,7 @@
<span class="skw">type</span>(<span class="str">"w"</span>,KeyModifier.CTRL)
<span class="kw">assert</span>(exists(<img src="SavechangePopup.png" />))
<span class="skw">click</span>(Pattern(<img src="SavechangePopup.png" />).targetOffset(-<span class="dig">170</span>,<span class="dig">56</span>))
<span class="kw">def</span> test_boxSetAtributes(self):
<span class="skw">click</span>(<img src="SearchBoxBar.png" />)
paste(<span class="str">"sinus"</span>)
<span class="skw">dragDrop</span>(<img src="Sinusoscilla-1.png" />,Pattern(<img src="DesignerDataGenOpen.png" />).similar(<span class="dig">0.40</span>).targetOffset(-<span class="dig">233</span>,-<span class="dig">163</span>))
<span class="skw">rightClick</span>(<img src="SinusOscillatorBoxSelected.png" />)
<span class="skw">click</span>(Pattern(<img src="contextualBoxMenu.png" />).targetOffset(-<span class="dig">51</span>,<span class="dig">16</span>))
<span class="kw">assert</span>(exists(<img src="renameBoxPopUp.png" />))
<span class="skw">type</span>(<span class="str">"XXXX XXXX XXXX"</span>+ Key.ENTER)
<span class="kw">assert</span>(exists(<img src="SinusOscillatorNewNameXXX.png" />))
waitVanish(Pattern(<img src="SavechangePopup.png" />).targetOffset(-<span class="dig">170</span>,<span class="dig">56</span>))
<span class="kw">def</span> tearDown(self):
App.close(self.terminal)
......
......@@ -23,15 +23,7 @@ def test_createSimpleScenarioAndRun(self):
type("w",KeyModifier.CTRL)
assert(exists("SavechangePopup.png"))
click(Pattern("SavechangePopup.png").targetOffset(-170,56))
def test_boxSetAtributes(self):
click("SearchBoxBar.png")
paste("sinus")
dragDrop("Sinusoscilla-1.png",Pattern("DesignerDataGenOpen.png").similar(0.40).targetOffset(-233,-163))
rightClick("SinusOscillatorBoxSelected.png")
click(Pattern("contextualBoxMenu.png").targetOffset(-51,16))
assert(exists("renameBoxPopUp.png"))
type("XXXX XXXX XXXX"+ Key.ENTER)
assert(exists("SinusOscillatorNewNameXXX.png"))
waitVanish(Pattern("SavechangePopup.png").targetOffset(-170,56))
def tearDown(self):
App.close(self.terminal)
......
......@@ -31,7 +31,7 @@ echo ""
if [ ${ov_build_type} == Profile ]; then
cmake ${ov_script_dir}/.. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O2 -g -DNDEBUG -pg' -DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO='-pgq' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${ov_install_dir}
cmake ${ov_script_dir}/.. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O2 -g -DNDEBUG -pg' -DCMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO='-pg' -DCMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO='-pg' -DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO='-pg' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${ov_install_dir}
else
cmake ${ov_script_dir}/.. -DCMAKE_BUILD_TYPE=${ov_build_type} -DCMAKE_INSTALL_PREFIX=${ov_install_dir}
fi
......
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