Skip to content

Commit bc0556a

Browse files
Commit to trigger CI checks to re-run since one workflow failed.
Added '.' at the end of code comments.
1 parent 5fc0f97 commit bc0556a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

scripts/tests/run_tv_casting_test.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def extract_value_from_string(line):
8585
# Returns False if the value does not match, True otherwise.
8686
def validate_value(expected_value, line, value_name):
8787

88-
# Extract the integer value from the string
88+
# Extract the integer value from the string.
8989
value = extract_value_from_string(line)
9090

9191
# If the discovered value does not match the expected value,
@@ -98,7 +98,7 @@ def validate_value(expected_value, line, value_name):
9898

9999
return False
100100

101-
# Return True if the value matches the expected value
101+
# Return True if the value matches the expected value.
102102
return True
103103

104104

@@ -119,46 +119,46 @@ def test_discovery_fn():
119119

120120
with open(LINUX_TV_APP_LOGS, 'w') as fd1, open(LINUX_TV_CASTING_APP_LOGS, 'w') as fd2:
121121

122-
# Run the Linux tv-app and write the output to file
122+
# Run the Linux tv-app and write the output to file.
123123
tv_app_rel_path = 'out/tv-app/chip-tv-app'
124124
tv_app_abs_path = os.path.abspath(tv_app_rel_path)
125125
tv_app_process = subprocess.Popen(tv_app_abs_path, stdout=fd1, stderr=subprocess.PIPE, text=True)
126126

127127
time.sleep(RUN_INTERVAL)
128128

129-
# Run the Linux tv-casting-app
129+
# Run the Linux tv-casting-app.
130130
tv_casting_app_rel_path = 'out/tv-casting-app/chip-tv-casting-app'
131131
tv_casting_app_abs_path = os.path.abspath(tv_casting_app_rel_path)
132132
tv_casting_app_process = subprocess.Popen(
133133
tv_casting_app_abs_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
134134

135-
# Initialize variables
135+
# Initialize variables.
136136
continue_parsing = False
137137
valid_discovered_commissioner_str = ''
138138

139-
# Read the output as we get it from the tv-casting-app process
139+
# Read the output as we get it from the tv-casting-app process.
140140
for line in tv_casting_app_process.stdout:
141141

142-
# Write the line to the Linux tv-casting-app log file
142+
# Write the line to the Linux tv-casting-app log file.
143143
fd2.write(line)
144144

145-
# Fail fast if "No commissioner discovered" string found
145+
# Fail fast if "No commissioner discovered" string found.
146146
if "No commissioner discovered" in line:
147147

148148
line = line.rstrip('\n')
149149
logging.error(line)
150150
handle_discovery_failure()
151151

152-
# Look for 'Discovered Commissioner'
152+
# Look for 'Discovered Commissioner'.
153153
if "Discovered Commissioner" in line:
154154

155155
line = line.rstrip('\n')
156156
valid_discovered_commissioner_str = line
157157

158-
# Continue parsing the content that belongs to the "Discovered Commissioner"
158+
# Continue parsing the content that belongs to the "Discovered Commissioner".
159159
continue_parsing = True
160160

161-
# Initialize variables to store the information of interest
161+
# Initialize variables to store the information of interest.
162162
valid_vendor_id = False
163163
valid_product_id = False
164164
valid_device_type = False
@@ -169,7 +169,7 @@ def test_discovery_fn():
169169

170170
if continue_parsing:
171171

172-
# Check if the Vendor ID, Product ID, and Device Type match the expected values
172+
# Check if the Vendor ID, Product ID, and Device Type match the expected values.
173173
if "Vendor ID:" in line:
174174

175175
# If the value of the Vendor ID does not match the expected value, then

0 commit comments

Comments
 (0)