#!/bin/sh

# EMU Deploy Test

# x: print commands before executing
# e: exit immediately if a command fails
set -xe

# Setup:
#   Clear syslog

# Use build (with kraken) & deploy script
bazel run //firmware/tools/scripts:emu_deploy_all vh6_emu_smoker || true
# Returns 255 for some reason?

# Capture output, proceed on 0
#  Unecessary if using `set -e`

# Wait for boot (no more than 1m)
# Ping until response, time how long it takes

# scp each app from emu
# Check for size/value
# Check .git files and look at their sha
# Consider difference between OS is up (ping)
#  vs all apps are running, (syslog?)
#   Can see when each app logs its start
