Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
regression-suites
Commits
babd0625
Commit
babd0625
authored
Sep 12, 2018
by
Thanassis Tsiodras
Browse files
Added test checking accuracy of fixed point results.
parent
60ffad9b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Demo_FixedPoint_and_TestAutomation/.gitignore
0 → 100644
View file @
babd0625
pseudosiimulink.zip
testsimulink.zip
Demo_FixedPoint_and_TestAutomation/regression.py
0 → 100755
View file @
babd0625
#!/usr/bin/env python
import
sys
,
os
sys
.
exit
(
0
if
0
==
os
.
system
(
"regression.sh"
)
else
1
)
Demo_FixedPoint_and_TestAutomation/regression.sh
0 → 100755
View file @
babd0625
#!/bin/bash
export
ASSERT_IGNORE_GUI_ERRORS
=
1
cp
-a
testSimulinkResponses.py binary.c/binaries/ground-GUI/
||
exit
1
cd
binary.c/binaries/
||
exit
1
./x86_partition & 2>/dev/null
cd
ground-GUI
||
exit
1
timeout
10 ./testSimulinkResponses.py 2>/dev/null
||
exit
1
killall x86_partition
exit
0
Demo_FixedPoint_and_TestAutomation/testSimulinkResponses.py
100644 → 100755
View file @
babd0625
...
...
@@ -22,7 +22,8 @@ from asn1_value_editor.udpcontroller import tasteUDP
@
Scenario
def
Exercise_ground
(
queue
):
'''ground processing'''
for
i
in
range
(
1000
):
for
i
in
range
(
100
):
queue
.
log
.
put
((
queue
.
name
,
'INFO'
,
'Test: '
+
str
(
i
)))
a
=
random
.
random
()
b
=
2
*
random
.
random
()
c
=
3
*
random
.
random
()
...
...
@@ -32,9 +33,12 @@ def Exercise_ground(queue):
out1
=
val
.
out1
.
Get
()
out2
=
val
.
out2
.
Get
()
if
abs
(
out1
-
a
-
b
-
c
)
>
0.0001
or
abs
(
out2
-
2.
*
a
)
>
0.0001
:
print
"Oops!"
,
a
,
b
,
c
,
out1
,
out2
queue
.
log
.
put
((
queue
.
name
,
'ERROR'
,
"Oops!"
+
str
(
a
)
+
","
+
str
(
b
)
+
","
+
str
(
c
)
+
" <==> "
+
str
(
out1
)
+
","
+
str
(
out2
)))
time
.
sleep
(
2
)
print
"What just happened..."
sys
.
stdout
.
flush
()
sys
.
exit
(
1
)
return
0
sys
.
exit
(
0
)
def
runScenario
(
pipe_in
=
None
,
pipe_out
=
None
,
udpController
=
None
):
# Queue for getting scenario status
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment