Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
cb650a1a
Commit
cb650a1a
authored
Sep 03, 2020
by
Remi Hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.2 integrating the new cots control procedure into the existing framework
parent
430496d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
26 deletions
+97
-26
ci-scripts/cls_cots_ue.py
ci-scripts/cls_cots_ue.py
+11
-0
ci-scripts/cots_ue_ctl.yaml
ci-scripts/cots_ue_ctl.yaml
+4
-4
ci-scripts/main.py
ci-scripts/main.py
+58
-20
ci-scripts/xml_files/fr1_ran_ue_proc.xml
ci-scripts/xml_files/fr1_ran_ue_proc.xml
+24
-2
No files found.
ci-scripts/cls_cots_ue.py
View file @
cb650a1a
...
...
@@ -57,6 +57,17 @@ class CotsUe:
mySSH
.
close
()
return
status
#simply check if the device id exists in the dictionary
#returns true if it exists, false otherwise
def
Check_Exists
(
self
,
target_id
):
#load cots commands dictionary
with
open
(
self
.
__cots_cde_dict_file
,
'r'
)
as
file
:
cots_ue_ctl
=
yaml
.
load
(
file
,
Loader
=
yaml
.
FullLoader
)
#check if ue id is in the dictionary
if
target_id
in
cots_ue_ctl
:
return
True
else
:
return
False
def
Set_Airplane
(
self
,
target_id
,
target_state_str
):
#load cots commands dictionary
...
...
ci-scripts/cots_ue_ctl.yaml
View file @
cb650a1a
oppo
:
9283sdfas7
:
#oppo
-
adb shell input keyevent KEYCODE_POWER
-
adb shell input swipe 300 700 300
0
-
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
-
adb shell input keyevent
20
-
adb shell input tap 968
324
s10
:
002
:
#s10
-
adb shell input keyevent KEYCODE_POWER
-
adb shell input swipe 200 900 200
300
-
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
-
adb shell input tap 968
324
s20
:
003
:
#s20
-
adb shell input keyevent KEYCODE_POWER
-
adb shell input swipe 200 900 200
300
-
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
-
adb shell input tap 968
324
xperia
:
004
:
#xperia
-
tbd
-
tbd
-
tbd
ci-scripts/main.py
View file @
cb650a1a
...
...
@@ -285,21 +285,29 @@ class OaiCiTest():
SSH
.
command
(
'ssh '
+
self
.
UEDevicesRemoteUser
[
idx
]
+
'@'
+
self
.
UEDevicesRemoteServer
[
idx
]
+
' '
+
self
.
UEDevicesOffCmd
[
idx
],
'\$'
,
60
)
SSH
.
close
()
return
# enable data service
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "svc data enable"'
,
'\$'
,
60
)
# The following commands are deprecated since we no longer work on Android 7+
# SSH.command('stdbuf -o0 adb -s ' + device_id + ' shell settings put global airplane_mode_on 1', '\$', 10)
# SSH.command('stdbuf -o0 adb -s ' + device_id + ' shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true', '\$', 60)
# a dedicated script has to be installed inside the UE
# airplane mode on means call /data/local/tmp/off
if
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/off"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/off'
,
'\$'
,
60
)
#airplane mode off means call /data/local/tmp/on
logging
.
debug
(
'
\u001B
[1mUE ('
+
device_id
+
') Initialize Completed
\u001B
[0m'
)
SSH
.
close
()
#RH quick add-on to integrate cots control defined by yaml
#if device_id exists in yaml dictionary, we execute the new procedure defined in cots_ue class
#otherwise we use the legacy procedure
if
COTS_UE
.
Check_Exists
(
device_id
):
#switch device to Airplane mode ON (ie Radio OFF)
COTS_UE
.
Set_Airplane
(
device_id
,
'ON'
)
else
# enable data service
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "svc data enable"'
,
'\$'
,
60
)
# The following commands are deprecated since we no longer work on Android 7+
# SSH.command('stdbuf -o0 adb -s ' + device_id + ' shell settings put global airplane_mode_on 1', '\$', 10)
# SSH.command('stdbuf -o0 adb -s ' + device_id + ' shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true', '\$', 60)
# a dedicated script has to be installed inside the UE
# airplane mode on means call /data/local/tmp/off
if
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/off"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/off'
,
'\$'
,
60
)
#airplane mode off means call /data/local/tmp/on
logging
.
debug
(
'
\u001B
[1mUE ('
+
device_id
+
') Initialize Completed
\u001B
[0m'
)
SSH
.
close
()
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
...
...
@@ -790,7 +798,13 @@ class OaiCiTest():
try
:
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
if
self
.
ADBCentralized
:
if
device_id
==
'84B7N16418004022'
:
#RH quick add on to integrate cots control defined by yaml
#if device Id exists in yaml dictionary, we execute the new procedure defined in cots_ue class
#otherwise we use the legacy procedure
if
COTS_UE
.
Check_Exists
(
device_id
):
#switch device to Airplane mode OFF (ie Radio ON)
COTS_UE
.
Set_Airplane
(
device_id
,
'OFF'
)
elif
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/on"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/on'
,
'\$'
,
60
)
...
...
@@ -827,7 +841,13 @@ class OaiCiTest():
if
count
==
15
or
count
==
30
:
logging
.
debug
(
'
\u001B
[1;30;43m Retry UE ('
+
device_id
+
') Flight Mode Off
\u001B
[0m'
)
if
self
.
ADBCentralized
:
if
device_id
==
'84B7N16418004022'
:
#RH quick add on to intgrate cots control defined by yaml
#if device id exists in yaml dictionary, we execute the new procedure defined in cots_ue class
#otherwise we use the legacy procedure
if
COTS_UE
.
Check_Exists
(
device_id
):
#switch device to Airplane mode ON (ie Radio OFF)
COTS_UE
.
Set_Airplane
(
device_id
,
'ON'
)
elif
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/off"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/off'
,
'\$'
,
60
)
...
...
@@ -835,7 +855,13 @@ class OaiCiTest():
SSH
.
command
(
'ssh '
+
self
.
UEDevicesRemoteUser
[
idx
]
+
'@'
+
self
.
UEDevicesRemoteServer
[
idx
]
+
' '
+
self
.
UEDevicesOffCmd
[
idx
],
'\$'
,
60
)
time
.
sleep
(
0.5
)
if
self
.
ADBCentralized
:
if
device_id
==
'84B7N16418004022'
:
#RH quick add on to integrate cots control defined by yaml
#if device id exists in yaml dictionary, we execute the new procedre defined incots_ue class
#otherwise we use the legacy procedure
if
COTS_UE
.
Check_Exists
(
device_id
):
#switch device to Airplane mode OFF (ie Radio ON)
COTS_UE
.
Set_Airplane
(
device_id
,
'OFF'
)
elif
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/on"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/on'
,
'\$'
,
60
)
...
...
@@ -918,7 +944,13 @@ class OaiCiTest():
try
:
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
if
self
.
ADBCentralized
:
if
device_id
==
'84B7N16418004022'
:
#RH quick add on to integrate cots control defined by yaml
#if device id exists in yaml dictionary, we execute the new procedure defined in cots_ue class
#otherwise we use the legacy procedure
if
COTS_UE
.
Check_Exists
(
device_id
):
#switch device to Airplane mode ON (ie Radio OFF)
COTS_UE
.
Set_Airplane
(
device_id
,
'ON'
)
elif
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/off"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/off'
,
'\$'
,
60
)
...
...
@@ -2697,7 +2729,13 @@ class OaiCiTest():
SSH
.
open
(
self
.
ADBIPAddress
,
self
.
ADBUserName
,
self
.
ADBPassword
)
# back in airplane mode on (ie radio off)
if
self
.
ADBCentralized
:
if
device_id
==
'84B7N16418004022'
:
#RH quick add on to intgrate cots control defined by yaml
#if device Id exists in yaml dictionary, we execute the new procedure defined in cots_ue class
#otherwise we use the legacy procedure
if
COTS_UE
.
Check_Exists
(
device_id
):
#switch device to Airplane mode ON (ie Radio OFF)
COTS_UE
.
Set_Airplane
(
device_id
,
'ON'
)
elif
device_id
==
'84B7N16418004022'
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell "su - root -c /data/local/tmp/off"'
,
'\$'
,
60
)
else
:
SSH
.
command
(
'stdbuf -o0 adb -s '
+
device_id
+
' shell /data/local/tmp/off'
,
'\$'
,
60
)
...
...
ci-scripts/xml_files/fr1_ran_ue_proc.xml
View file @
cb650a1a
...
...
@@ -28,15 +28,37 @@
010000
030000
040000
0
20000
0
10001
000001
050000
070001
070000
010002
010003
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase
id=
"010000"
>
<class>
Initialize_UE
</class>
<desc>
Initialize UE
</desc>
</testCase>
<testCase
id=
"010003"
>
<class>
Terminate_UE
</class>
<desc>
Terminate UE
</desc>
</testCase>
<testCase
id=
"010001"
>
<class>
Attach_UE
</class>
<desc>
Attach UE
</desc>
</testCase>
<testCase
id=
"010002"
>
<class>
Detach_UE
</class>
<desc>
Detach UE
</desc>
</testCase>
<testCase
id=
"010000"
>
<class>
COTS_UE_Airplane
</class>
<desc>
Toggle COTS Airplane mode ON
</desc>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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