Skip to content

Commit 6cd99d7

Browse files
committed
Split devices into sections
1 parent e14849b commit 6cd99d7

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

.github/workflows/wireless-performance-autotest.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,27 @@ jobs:
240240
cat > "$FILENAME" <<- EOT
241241
## Devices Under Tests
242242
243-
This section presents the performance test results, including key metrics and technical details from the test execution.
243+
This section presents the performance test results, including key metrics and technical details from the test execution.
244244
**Test Date:** [15.3.2025](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})
245245
EOT
246-
for device in $(ls test | grep -oP 'wlx\w+' | sort | uniq); do
247-
source test/$device.sysinfo
248-
cat >> "$FILENAME" <<- EOT
249-
### $DEVICE_NAME
246+
247+
# Step 1: Get all device identifiers
248+
device_ids=$(ls test | grep -oP 'wlx\w+' | sort | uniq)
249+
250+
# Step 2: Build a list of unique classes
251+
classes=$(for device in $device_ids; do
252+
source test/$device.sysinfo
253+
echo "$DEVICE_CLASS"
254+
done | sort -u)
255+
256+
# Step 3: Group and output by class
257+
for class in $classes; do
258+
echo "### $class" >> "$FILENAME"
259+
for device in $device_ids; do
260+
source test/$device.sysinfo
261+
if [ "$DEVICE_CLASS" = "$class" ]; then
262+
cat >> "$FILENAME" <<- EOT
263+
#### $DEVICE_NAME
250264
251265
<img src=https://stuff.armbian.com/netbox/media/devicetype-images/$DEVICE_TYPE.png>
252266
@@ -258,25 +272,29 @@ jobs:
258272
259273
=== "Forward mode (client to server)"
260274
261-
\`\`\`
275+
\`\`\`
262276
$(cat test/$device-tx.log | sed 's/^/ /')
263-
\`\`\`
277+
\`\`\`
264278
265279
=== "Reverse mode (server to client)"
266280
267-
\`\`\`
281+
\`\`\`
268282
$(cat test/$device-rx.log | sed 's/^/ /')
269-
\`\`\`
283+
\`\`\`
270284
271285
=== "Wireless link info"
272286
273-
\`\`\`
287+
\`\`\`
274288
$(cat test/$device-info.log | sed 's/^/ /')
275-
\`\`\`
289+
\`\`\`
276290
277291
EOT
292+
fi
293+
done
278294
done
279-
cat $FILENAME >> $GITHUB_STEP_SUMMARY
295+
296+
cat "$FILENAME" >> "$GITHUB_STEP_SUMMARY"
297+
280298
281299
- name: Replace content in markdown document
282300
run: |

0 commit comments

Comments
 (0)