Refactor test workflow

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-10-09 17:45:49 +02:00
parent 2f177eb8df
commit 11a3472941
6 changed files with 41 additions and 39 deletions

20
tests/startup.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
OK="\033[32mok\033[0m"
FAIL="\033[31mfail\033[0m"
echo -n "Start PCSC... "
/usr/sbin/pcscd &
test $? -eq 0 && echo -e "${OK}" || {
echo -e "${FAIL}"
exit 1
}
sleep 2
rm -f memory.flash
tar -xf tests/memory.tar.gz
echo -n "Start Pico HSM... "
./build_in_docker/pico_hsm > /dev/null 2>&1 &
test $? -eq 0 && echo -e "${OK}" || {
echo -e "${FAIL}"
exit 1
}