extended-tests: lock the board

A possible solution to Gitea issue #8.
This commit is contained in:
Astro 2019-05-29 23:46:03 +02:00
parent b01f6aee27
commit c1af8be5ad

View File

@ -92,6 +92,12 @@ in
cp /opt/hydra_id_rsa.pub $HOME/.ssh/id_rsa.pub
echo "rpi-1,192.168.1.188 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMc7waNkP2HjL5Eo94evoxJhC8CbYj4i2n1THe5TPIR3" > $HOME/.ssh/known_hosts
chmod 600 $HOME/.ssh/id_rsa
mkfifo /tmp/lockctl
( cat /tmp/lockctl ) | ssh rpi-1 'flock /tmp/board_lock-kc705-1 -c "echo Ok; cat"' | (
# Read "Ok" line when remote successfully locked
read LOCK_OK
artiq_flash -t kc705 -H rpi-1
sleep 15
# ping: socket: Operation not permitted
@ -103,6 +109,10 @@ in
${windowsRunner { testCommand = "set ARTIQ_ROOT=%cd%\\anaconda\\envs\\artiq-env\\Lib\\site-packages\\artiq\\examples\\kc705_nist_clock&&python -m unittest discover -v artiq.test.coredevice"; }}/bin/run.sh
# End remote flock via FIFO
echo > /tmp/lockctl
)
mkdir $out
cp ${generatedNix}/pkgs/artiq-version.nix $out/passed
'';