Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the wwan connection tests to support multiple cycle connection tests (New) #1309

Closed
wants to merge 32 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e8bbfd3
allow the wwan connection test to multiple cycles
stanley31huang Jun 21, 2024
67dc162
Add unit test and modified resource scripts
stanley31huang Jun 24, 2024
b8b1193
Update test job
stanley31huang Jul 8, 2024
d36b9b5
update the test case and scripts
stanley31huang Jul 15, 2024
eefda52
add setup and teardown for 3g connection test
stanley31huang Aug 5, 2024
6a2c444
allow the wwan connection test to multiple cycles
stanley31huang Jun 21, 2024
a3f64eb
Add unit test and modified resource scripts
stanley31huang Jun 24, 2024
dd9e5a5
Update providers/base/units/wwan/resource.pxu
stanley31huang Jul 2, 2024
9029975
Update providers/base/units/wwan/jobs.pxu
stanley31huang Jul 2, 2024
b075c5d
Update providers/base/units/wwan/jobs.pxu
stanley31huang Jul 2, 2024
e564a37
remove unnecessary files
stanley31huang Aug 5, 2024
feaf673
Revert "remove unnecessary files"
stanley31huang Aug 6, 2024
268f515
update wwan_resource jobs
stanley31huang Aug 6, 2024
5b92d2d
fix unittest
stanley31huang Aug 6, 2024
8d8dae8
fix conflict in wwan test plan
stanley31huang Aug 6, 2024
2228db0
fix bug
stanley31huang Aug 6, 2024
8ec106c
fix conflict
stanley31huang Sep 27, 2024
0463efb
Add manifest units to expand output (New) (#1489)
Hook25 Sep 27, 2024
2605982
Correct the camera job cmd with right camera tests (Bugfix) (#1515)
seankingyang Sep 30, 2024
6a3e3c1
Fix snap refresh verification job dependency (bugfix) (#1519)
pieqq Oct 1, 2024
ba4bbb7
Add a manifest entry to check if a SIM card is inserted (New) (#1500)
pieqq Oct 1, 2024
85ee304
Includes libasound2-dev as a Dependency in Build Instructions (Infra)…
mauriciocoder Oct 2, 2024
92a28be
Make workflow dispatch checkbox from source into action (infra) (#1517)
Hook25 Oct 2, 2024
17ceef1
Use wwan-automated nested part in SRU test plan (bugfix) (#1499)
pieqq Oct 2, 2024
597b01f
Update workflow validation action to the latest version (infra) (#1526)
Hook25 Oct 3, 2024
5022493
Reboot check test python version (New) (#1338)
tomli380576 Oct 4, 2024
c6080e8
Update boot.pxu for PR#1338 (New) (#1339)
tomli380576 Oct 4, 2024
92f1b3f
Simplify Image Capture Logic in _still_image_helper (New) (#1523)
mauriciocoder Oct 4, 2024
cd772da
Add cpuid for turin (bugfix) (#1530)
Hook25 Oct 4, 2024
017d7ff
Howto use match (infra) (#1532)
Hook25 Oct 7, 2024
0f1a673
Merge branch 'wwan-multiple-test' of github.com:canonical/checkbox in…
stanley31huang Oct 7, 2024
cf8e538
apply siblings flag for wwan reconnection test
stanley31huang Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add setup and teardown for 3g connection test
apply context manager as setup and teardown functions during 3g
connection test
stanley31huang committed Sep 27, 2024
commit eefda525bebc991a749f2315cdb305776c68e8ea
23 changes: 13 additions & 10 deletions providers/base/bin/wwan_tests.py
Original file line number Diff line number Diff line change
@@ -334,7 +334,7 @@ def _ping_test(if_name):

class ThreeGppConnection:

def invoked(self):
def register_argument(self):
parser = argparse.ArgumentParser()
parser.add_argument(
"hw_id", type=str, help="The hardware ID of the modem"
@@ -353,22 +353,25 @@ def invoked(self):
default=30,
help="delay before ping test",
)
args = parser.parse_args(sys.argv[2:])
return parser.parse_args(sys.argv[2:])

mm = MMCLI()
mm_id = mm.equipment_id_to_mm_id(args.hw_id)
wwan_control_if = mm.get_primary_port(mm_id)
def invoked(self):

args = self.register_argument()

ret_code = 1
try:
_create_3gpp_connection(wwan_control_if, args.apn)
_wwan_radio_on()
time.sleep(args.wwan_setup_time)
ret_code = _ping_test(args.wwan_net_if)
with WWANTestCtx(args.hw_id, True, True) as ctx:
wwan_control_if = ctx.mm_obj.get_primary_port(
str(ctx.modem_idx)
)
_create_3gpp_connection(wwan_control_if, args.apn)
time.sleep(args.wwan_setup_time)
ret_code = _ping_test(args.wwan_net_if)
except subprocess.SubprocessError:
pass
_destroy_3gpp_connection()
_wwan_radio_off()

sys.exit(ret_code)