Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0cbf72c
SU 2.5 Step 1 and 2
jtrejoespinoza-grid Sep 24, 2025
1e13b90
Added basic logic for step 3
jtrejoespinoza-grid Sep 24, 2025
97c59c2
Added logic for step 4
jtrejoespinoza-grid Sep 24, 2025
ec54e85
Completed step 5 ( still need to check if we can confirm the download…
jtrejoespinoza-grid Sep 24, 2025
8a571d0
Added step 5 , verify downloaded file check
jtrejoespinoza-grid Sep 25, 2025
09c5210
Changes for SUBase
jtrejoespinoza-grid Sep 25, 2025
ff0aca3
Merge branch 'project-chip:master' into tc_softwareupdate2_5
jtrejoespinoza-grid Sep 26, 2025
d43bfca
Incomming changes from su_base_class branch
jtrejoespinoza-grid Sep 26, 2025
45aef44
Added line to show when the wait time of 3 minutes has completed.
jtrejoespinoza-grid Sep 26, 2025
68ab5c1
Updated wait times as the spec. Added secondary implementnation for e…
jtrejoespinoza-grid Sep 29, 2025
ce5a054
Ruff and isort fix
jtrejoespinoza-grid Sep 29, 2025
40bad1b
Added better reading for step2: Added attribute wait for BasicInforma…
jtrejoespinoza-grid Oct 1, 2025
6e457eb
isort check
jtrejoespinoza-grid Oct 1, 2025
b403344
Merge branch 'master' into tc_softwareupdate2_5
jtrejoespinoza-grid Oct 8, 2025
4513ce2
Merge branch 'master' into tc_softwareupdate2_5
jtrejoespinoza-grid Oct 9, 2025
13ded86
Revert "Incomming changes from su_base_class branch"
jtrejoespinoza-grid Oct 8, 2025
56823c7
base class changes
jtrejoespinoza-grid Oct 9, 2025
81e30af
Updates for 2.5
jtrejoespinoza-grid Oct 10, 2025
19e4180
Interval fix
jtrejoespinoza-grid Oct 10, 2025
c6e5dab
New updates for handling await time after apply or delayapplyupdate
jtrejoespinoza-grid Oct 10, 2025
1d9ff88
Fix invalid method for event handler
jtrejoespinoza-grid Oct 11, 2025
438b4a7
Updated to user test arguments
jtrejoespinoza-grid Oct 17, 2025
de3fbe7
Revert "base class changes"
jtrejoespinoza-grid Oct 17, 2025
0ca5c31
Merge branch 'master' into tc_softwareupdate2_5
jtrejoespinoza-grid Oct 17, 2025
e044f1c
Integrated su_base_class branch
jtrejoespinoza-grid Oct 17, 2025
db81854
Updated test to use test arguments
jtrejoespinoza-grid Oct 17, 2025
f305ddd
Remove read_from_logs. Verify with update state idle
jtrejoespinoza-grid Oct 22, 2025
9e3f36c
Merge branch 'master' into tc_softwareupdate2_5
jtrejoespinoza-grid Oct 24, 2025
0dc4b24
Revert "Integrated su_base_class branch"
jtrejoespinoza-grid Oct 24, 2025
ab30ae1
Merge base class: Remove if needed
jtrejoespinoza-grid Oct 24, 2025
323f26d
ruff Changes
jtrejoespinoza-grid Oct 24, 2025
4525982
Merge branch 'master' into tc_softwareupdate2_5
jtrejoespinoza-grid Nov 5, 2025
4edda3f
Minor changes for SU 2.5. Added restart and state value tracking.
jtrejoespinoza-grid Nov 6, 2025
9359df4
Stop the app before start. Needed to avoid port collissions for apps …
jtrejoespinoza-grid Nov 6, 2025
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
5 changes: 2 additions & 3 deletions scripts/tests/run_python_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,13 @@ def monitor_app_restart_requests(
os.unlink(restart_flag_file)

new_app_manager = AppProcessManager(app, app_args, app_ready_pattern, stream_output, app_stdin_pipe)
new_app_manager.start()
app_manager_ref[0].stop()
with app_manager_lock:
app_manager_ref[0].stop()
new_app_manager.start()
app_manager_ref[0] = new_app_manager

# After restart is complete, we can exit the monitor thread
logging.info("App restart completed, monitor thread exiting")
break
else:
time.sleep(0.5)
except Exception as e:
Expand Down
38 changes: 38 additions & 0 deletions src/python_testing/TC_SUTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import logging
import tempfile
from os import path
from time import sleep
from typing import Optional

from mobly import asserts
Expand Down Expand Up @@ -300,3 +301,40 @@ def create_acl_entry(self,
nodeId=provider_node_id,
attributes=[(0, acl_attribute)]
)

def restart_requestor(self, requestor_th):
"""This method restart the requestor to restore Softwareupdate version.

Args:
controller (_type_): _description_
"""
restart_flag_file = self.get_restart_flag_file()
logger.info(f"RESTART FILE at {restart_flag_file}")
if not restart_flag_file:
# No restart flag file: ask user to manually reboot
self.wait_for_user_input(prompt_msg="Reboot the DUT. Press Enter when ready.\n")

# After manual reboot, expire previous sessions so that we can re-establish connections
logging.info("Expiring sessions after manual device reboot")
requestor_th.ExpireSessions(self.requestor_node_id)
logging.info("Manual device reboot completed")

else:
try:
# Create the restart flag file to signal the test runner
with open(restart_flag_file, "w") as f:
f.write("restart")
logging.info("Created restart flag file to signal app restart")

# The test runner will automatically wait for the app-ready-pattern before continuing
# Waiting 1 second after the app-ready-pattern is detected as we need to wait a tad longer for the app to be ready and stable, otherwise TH2 connection fails later on in test step 14.
sleep(1)

# Expire sessions and re-establish connections
logging.info("Expiring sessions after manual device reboot")
requestor_th.ExpireSessions(self.requestor_node_id)
logging.info("App restart completed successfully")

except Exception as e:
logging.error(f"Failed to restart Requestor: {e}")
asserts.fail(f"Requestor restart failed: {e}")
Loading
Loading