From 749269847c1271293ea77c2abce9c1f9add00b09 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Tue, 8 Apr 2025 22:39:22 +0200 Subject: [PATCH] Using DHCP mode for client rather then fixed, adjust README --- .github/workflows/usb-wireless-autotest.yml | 28 ++++++--------------- README.md | 2 +- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/usb-wireless-autotest.yml b/.github/workflows/usb-wireless-autotest.yml index 8a8fe52f..2c9b491a 100644 --- a/.github/workflows/usb-wireless-autotest.yml +++ b/.github/workflows/usb-wireless-autotest.yml @@ -68,16 +68,7 @@ jobs: shell: bash run: | - # determine the access point name - # based on the device class - # AX - 6GHz - # AC600 - 5GHz - # AC - 2.4GHz - case "${{ matrix.json.device_class }}" in - AX) ACCESS_POINT="GOSTJE60" ;; - AC600) ACCESS_POINT="GOSTJE50" ;; - *) ACCESS_POINT="GOSTJE24" ;; - esac + ACCESS_POINT="GOSTJE60" # generate the YAML file # for the wireless device @@ -92,14 +83,8 @@ jobs: renderer: networkd wifis: ${{ env.DEVICE }}: - addresses: - - "10.0.50.50/24" - nameservers: - addresses: - - 9.9.9.9 - - 1.1.1.1 - dhcp4: false - dhcp6: false + dhcp4: true + dhcp6: true macaddress: "${{ matrix.json.serial }}" access-points: "${ACCESS_POINT}": @@ -125,18 +110,21 @@ jobs: while true; do # nmcli -t -f NAME connection show --active | grep ${DEVICE} CONNECTION=$(ssh ci@${{ env.IP_ADDR }} "networkctl | grep ${{ env.DEVICE }} | grep routable || true") - if [[ -n "${CONNECTION}" ]]; then + CLIENTIP=$(ssh ci@${{ env.IP_ADDR }} "ip -4 addr show ${{ env.DEVICE }} | grep -oP '(?<=inet\s)\d+(\.\d+){3}' || true") + # check if the connection is routable + if [[ -n "${CONNECTION}" && -n "${CLIENTIP}" ]]; then break fi sleep 2 done + echo "CLIENTIP=${CLIENTIP}" >> $GITHUB_ENV - name: "Do some perf testing" shell: bash run: | mkdir -p test - numbers=$(ssh ci@${{ env.IP_ADDR }} "iperf3 -R -c 10.0.60.10 -B 10.0.50.50 -t 5 -J | jq '.intervals[] .sum .bits_per_second' | LC_ALL=C datamash median 1 | cut -d"-" -f2") + numbers=$(ssh ci@${{ env.IP_ADDR }} "iperf3 -R -c 10.0.60.10 -B ${{ env.CLIENTIP }} -t 5 -J | jq '.intervals[] .sum .bits_per_second' | LC_ALL=C datamash median 1 | cut -d"-" -f2") mbits=$(echo $numbers | LC_ALL=C awk '{$1/=1048576;printf "%.0f Mbps\n",$1}') echo "|${{ matrix.json.name }}|${{ matrix.json.device_type }}| ${{ matrix.json.serial }} | ${{ matrix.json.device_class }} | ${mbits} |" > test/ci@${{ env.DEVICE }}.iperf diff --git a/README.md b/README.md index 44caefe1..7a048c69 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,5 @@ It prepares several data exchange files. | Compare all mirrors content and generate redirector configs | GitHub Workflow Status | | Update download JSON index|GitHub Workflow Status| | Pull excerpts from Armbian Jira|GitHub Workflow Status| -| USB wireless performance testig |GitHub Workflow Status| +| Wireless performance testig |GitHub Workflow Status| | Mirror repository artifacts to our CDN |GitHub Workflow Status|