X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-bringup%2Ftest-chaoskey;h=266848754700fdb24a9dad96bb3a9228c68298d7;hp=b4c8164f584b716cc64123b4cb725d57b2115b2d;hb=HEAD;hpb=71e3a59e42c284fde8ac2767abd029230ed86e07 diff --git a/ao-bringup/test-chaoskey b/ao-bringup/test-chaoskey index b4c8164f..3d510971 100755 --- a/ao-bringup/test-chaoskey +++ b/ao-bringup/test-chaoskey @@ -12,7 +12,9 @@ case "$#" in serial="--serial $1" ;; 0) - snum=`dmesg | grep 'on chaoskey' | tail -1 | sed 's/.*chaoskey \([0-9a-f][0-9a-f]*\) on chaoskey.*/\1/'` + snum=`sudo dmesg -t | awk '/usb.*Product:/ { ck = index($0, "ChaosKey"); } + /usb.*SerialNumber:/ { if (ck) print $4; }' | tail -1` + case "$snum" in "") serial="" @@ -35,7 +37,7 @@ tests="0:100 1:100 2:100 3:100 12:10 13:100 15:10000 16:250 202:1000 203:100 204 PASS=0 FAIL=0 WEAK=0 -../ao-tools/ao-chaosread/ao-chaosread $serial --infinite --bytes | for test in $tests done; do +chaosread $serial --infinite --bytes | for test in $tests done; do case $test in *:*:*) dnum=`echo $test | sed 's/:.*$//'`