From 563161860e56fa45c4e3c39b04b247ab8aa0ae13 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 4 Jul 2020 17:27:42 +0800 Subject: [PATCH] zynq: add HITL test (WIP) --- zynq.nix | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/zynq.nix b/zynq.nix index 218dff1..76bc3f8 100644 --- a/zynq.nix +++ b/zynq.nix @@ -20,4 +20,30 @@ in ) zc706.zc706 ) // ( builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq - ) + ) // { + zc706-hitl-tests = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation { + name = "zc706-hitl-tests"; + + # requires patched Nix + __networked = true; + + buildInputs = [ + pkgs.openssh pkgs.rsync + ]; + phases = [ "buildPhase" ]; + + buildPhase = + '' + export HOME=`mktemp -d` + mkdir $HOME/.ssh + cp /opt/hydra_id_rsa $HOME/.ssh/id_rsa + cp /opt/hydra_id_rsa.pub $HOME/.ssh/id_rsa.pub + echo "rpi-4 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJu+HhQmQAclub9K/B3xUQ28lBg+MEdqSeBuQNZgPGKB" > $HOME/.ssh/known_hosts + chmod 600 $HOME/.ssh/id_rsa + + ${}/remote_run.sh -d ${artiq-zynq.zc706-simple-jtag} + + touch $out + ''; + }); + }