Debian Codegraph @

launcher/image/test/scripts/test_memory_monitoring.sh

raw
1 #!/bin/bash
2 set -euxo pipefail
3 source util/read_serial.sh
4
5 # Allow VM some time to boot and write to serial console.
6 sleep 120
7
8 SERIAL_OUTPUT=$(read_serial $1 $2)
9 if echo $SERIAL_OUTPUT | grep -q "$3"
10 then
11 echo "- '$3' found in the VM serial output"
12 else
13 echo "FAILED: '$3' not found in the VM serial output"
14 echo 'TEST FAILED.' > /workspace/status.txt
15 echo $SERIAL_OUTPUT
16 fi
17