Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
ece9b5da
Commit
ece9b5da
authored
5 years ago
by
Pieter Donker
Browse files
Options
Downloads
Patches
Plain Diff
#2995: changed main.py to use central_status_unb2.sh and central_commands_unb2.sh
parent
d93ba191
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/apertif/commissioning/main.py
+56
-12
56 additions, 12 deletions
applications/apertif/commissioning/main.py
with
56 additions
and
12 deletions
applications/apertif/commissioning/main.py
+
56
−
12
View file @
ece9b5da
...
...
@@ -47,8 +47,6 @@ import sys
tc
=
test_case
.
Testcase
(
'
MAIN -
'
,
''
)
supportedApps
=
[
'
apertif-ag
'
,
'
apertif-dev
'
,
'
arts_sc1
'
,
'
arts_sc4
'
,
'
arts_sc4-iab
'
]
if
tc
.
appStr
in
supportedApps
:
app_str
=
'
Application:
'
+
tc
.
appStr
...
...
@@ -66,8 +64,11 @@ for tel in tc.telStrList:
lcu_str
=
lcu_str
+
'
lcu-rt
'
+
str
(
tel
)
+
'
,
'
tc
.
append_log
(
1
,
lcu_str
[:
-
1
])
unb_str
=
'
Targetting UniBoards:
'
+
str
(
tc
.
unbStr
)
tc
.
append_log
(
1
,
unb_str
)
unb1_str
=
'
Targetting UniBoards:
'
+
str
(
tc
.
unb1Str
)
tc
.
append_log
(
1
,
unb1_str
)
unb2_str
=
'
Targetting UniBoards2:
'
+
str
(
tc
.
unb2Str
)
tc
.
append_log
(
1
,
unb2_str
)
#tc.polStr
#tc.polNrs
...
...
@@ -88,16 +89,32 @@ print 'UNBS_BF = ' + UNBS_BF
###############################################################################
# Check if central UniBoard system is ready for action. If not, exit immediately.
###############################################################################
if
tc
.
unbStr
==
''
:
if
tc
.
unb
1
Str
==
''
:
print
'
Omitting call to central_status, since no XC boards are addressed.
'
else
:
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unbStr
+
'
'
+
'
precheck
'
+
'
'
+
tc
.
polStr
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unb
1
Str
+
'
'
+
'
precheck
'
+
'
'
+
tc
.
polStr
print
'
ccu-corr
'
+
'
:$
'
+
cmd
output
=
shell
.
ssh_cmd
(
'
ccu-corr
'
,
cmd
,
tc
)
if
"
Error
"
in
output
or
not
"
Passed
"
in
output
:
print
"
Exiting due to central errors
"
sys
.
exit
()
###############################################################################
# Check if central UniBoard system is ready for action. If not, exit immediately.
###############################################################################
if
tc
.
unb1Str
==
''
:
print
'
Omitting call to central_status_unb2, since no XC or UNB2 boards are addressed.
'
else
:
if
tc
.
unb2Str
==
''
:
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status_unb2.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
'
16,17,18,19
'
+
'
'
+
'
precheck
'
+
'
'
+
tc
.
polStr
else
:
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status_unb2.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unb2Str
+
'
'
+
'
precheck
'
+
'
'
+
tc
.
polStr
print
'
ccu-corr
'
+
'
:$
'
+
cmd
output
=
shell
.
ssh_cmd
(
'
ccu-corr
'
,
cmd
,
tc
)
if
"
Error
"
in
output
or
not
"
Passed
"
in
output
:
print
"
Exiting due to central uniboard2 errors
"
sys
.
exit
()
###############################################################################
# Check if dish UniBoard systems are ready for action. If not, exit immediately.
###############################################################################
...
...
@@ -122,14 +139,28 @@ for lcu in LCUS:
###############################################################################
# Run central commands in foreground
###############################################################################
if
tc
.
unbStr
==
''
:
if
tc
.
unb
1
Str
==
''
:
pass
else
:
subcommand
=
'
. $RADIOHDL/applications/apertif/commissioning/central_commands.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unbStr
+
'
'
+
tc
.
optStr
+
'
'
+
tc
.
polStr
subcommand
=
'
. $RADIOHDL/applications/apertif/commissioning/central_commands.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unb
1
Str
+
'
'
+
tc
.
optStr
+
'
'
+
tc
.
polStr
command
=
subcommand
+
'
| tee ~/central_commands.log
'
print
'
ccu-corr
'
+
'
:$
'
+
command
shell
.
ssh_cmd
(
'
ccu-corr
'
,
command
,
tc
)
###############################################################################
# Run central commands for unb2 in foreground
###############################################################################
if
tc
.
unb1Str
==
''
:
pass
else
:
if
tc
.
unb2Str
==
''
:
subcommand
=
'
. $RADIOHDL/applications/apertif/commissioning/central_commands_unb2.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
'
16,17,18,19
'
+
'
'
+
tc
.
optStr
+
'
'
+
tc
.
polStr
else
:
subcommand
=
'
. $RADIOHDL/applications/apertif/commissioning/central_commands_unb2.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unb2Str
+
'
'
+
tc
.
optStr
+
'
'
+
tc
.
polStr
command
=
subcommand
+
'
| tee ~/central_commands_unb2.log
'
print
'
ccu-corr
'
+
'
:$
'
+
command
shell
.
ssh_cmd
(
'
ccu-corr
'
,
command
,
tc
)
###############################################################################
# Wait until remote dish commands are done
###############################################################################
...
...
@@ -147,7 +178,7 @@ for lcu in LCUS:
# Reset the XAUI cores in the front end Apertif beam former and at central UniBoards
###############################################################################
time
.
sleep
(
1
)
if
tc
.
unbStr
==
''
:
if
tc
.
unb
1
Str
==
''
:
print
'
Omitting xaui reset, since no XC boards are addressed.
'
else
:
cmd
=
'
python $UPE/peripherals/pi_tr_xaui.py --unb
'
+
UNBS_BF
+
'
--fn 0:3 -r 0:2 --reg reset_control_status=3
'
...
...
@@ -189,7 +220,6 @@ for lcu in LCUS:
cmd
=
'
python $UPE/peripherals/util_dp_xonoff.py --unb
'
+
str
(
offset
+
4
)
+
'
--fn
'
+
str
(
unb
%
4
)
+
'
-v 5 -s OUTPUT -n 2
'
shell
.
ssh_cmd
(
lcu
,
cmd
,
tc
)
###############################################################################
# Enable data path if this is not a re-run
...
...
@@ -241,13 +271,27 @@ for lcu in LCUS:
###############################################################################
# Everything should be up and running - check central UniBoard system
###############################################################################
if
tc
.
unbStr
==
''
:
if
tc
.
unb
1
Str
==
''
:
print
'
Omitting call to central_status, since no XC boards are addressed.
'
else
:
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unbStr
+
'
'
+
'
postcheck
'
+
'
'
+
tc
.
polStr
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unb
1
Str
+
'
'
+
'
postcheck
'
+
'
'
+
tc
.
polStr
print
'
ccu-corr
'
+
'
:$
'
+
cmd
output
=
shell
.
ssh_cmd
(
'
ccu-corr
'
,
cmd
,
tc
)
if
"
Error
"
in
output
or
not
"
Passed
"
in
output
:
print
"
Found post-command central errors
"
###############################################################################
# Everything should be up and running - check central UniBoard2 system
###############################################################################
if
tc
.
unb1Str
==
''
:
print
'
Omitting call to central_status_unb2, since no XC or unb2 boards are addressed.
'
else
:
if
tc
.
unb2Str
==
''
:
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status_unb2.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
'
16,17,18,19
'
+
'
'
+
'
postcheck
'
+
'
'
+
tc
.
polStr
else
:
cmd
=
'
. $RADIOHDL/applications/apertif/commissioning/central_status_unb2.sh
'
+
tc
.
appStr
+
'
'
+
tc
.
telStr
+
'
'
+
tc
.
unb2Str
+
'
'
+
'
postcheck
'
+
'
'
+
tc
.
polStr
print
'
ccu-corr
'
+
'
:$
'
+
cmd
output
=
shell
.
ssh_cmd
(
'
ccu-corr
'
,
cmd
,
tc
)
if
"
Error
"
in
output
or
not
"
Passed
"
in
output
:
print
"
Found post-command central errors
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment