Skip to content

Commit 48611a1

Browse files
committed
Refactor Test 1 to simplify serial number validation for STM32F103RE devices
1 parent db56c88 commit 48611a1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ jobs:
2424
. .venv/bin/activate
2525
bmlab-scan | tee scan1.txt
2626
count=$(grep -c "Target: *STM32F103RE" scan1.txt)
27-
serials=$(grep -A2 "Target: *STM32F103RE" scan1.txt | grep -oE 'Serial: *[0-9]+' | awk '{print $2}' | sort | uniq | wc -l)
28-
if [ "$count" -eq 3 ] && [ "$serials" -eq 3 ]; then
27+
if [ "$count" -eq 3 ]; then
2928
echo "Test 1 passed"
3029
else
31-
echo "Test 1 failed: found $count STM32F103RE, $serials unique serials"; cat scan1.txt; exit 1
30+
echo "Test 1 failed: found $count STM32F103RE"; cat scan1.txt; exit 1
3231
fi
3332
3433
- name: Test 2 — bmlab-scan -p jlink

0 commit comments

Comments
 (0)