Fix start-up test script

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2025-11-30 19:11:53 +01:00
parent 9742991deb
commit 42a13b2777

View File

@@ -18,6 +18,7 @@ sleep 1
rm -f memory.flash rm -f memory.flash
echo -n "Start Pico OpenPGP..." echo -n "Start Pico OpenPGP..."
./build_in_docker/pico_openpgp > /dev/null 2>&1 & ./build_in_docker/pico_openpgp > /dev/null 2>&1 &
PID=$!
test $? -eq 0 && echo -n "." || fail test $? -eq 0 && echo -n "." || fail
sleep 1 sleep 1
ATR="3b:da:18:ff:81:b1:fe:75:1f:03:00:31:f5:73:c0:01:60:00:90:00:1c" ATR="3b:da:18:ff:81:b1:fe:75:1f:03:00:31:f5:73:c0:01:60:00:90:00:1c"
@@ -27,4 +28,19 @@ test $? -eq 0 && echo -e "${OK}" || fail
pytest tests -W ignore::DeprecationWarning pytest tests -W ignore::DeprecationWarning
echo -n "Stopping Pico OpenPGP..."
kill "$PID" 2>/dev/null || true
kill -9 "$PID" 2>/dev/null || true
test $? -eq 0 && echo -e "${OK}" || fail
sleep 1
rm -f memory.flash
echo -n "Start Pico OpenPGP..."
./build_in_docker/pico_openpgp > /dev/null 2>&1 &
PID=$!
test $? -eq 0 && echo -n "." || fail
sleep 1
e=$(opensc-tool -an 2>&1)
grep -q "${ATR}" <<< $e && echo -n "." || fail
test $? -eq 0 && echo -e "${OK}" || fail
./tests/scripts/cli-test.sh ./tests/scripts/cli-test.sh