launcher/image/test/scripts/test_launchpolicy_log_debug.sh
raw| 1 | #!/bin/bash |
| 2 | set -euo 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 'logging redirection not allowed by image' |
| 10 | then |
| 11 | echo "- Log launch policy verified" |
| 12 | else |
| 13 | echo "FAILED: Log launch policy verification" |
| 14 | echo 'TEST FAILED' > /workspace/status.txt |
| 15 | echo $SERIAL_OUTPUT |
| 16 | fi |