Debian Codegraph @

launcher/image/test/scripts/test_launchpolicy_env.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 --fixed-strings 'env var {OUT a} is not allowed to be overridden on this image; allowed envs to be overridden: [ALLOWED_OVERRIDE]'
10 then
11 echo "- Env launch policy verified"
12 else
13 echo "FAILED: Env launch policy verification"
14 echo 'TEST FAILED' > /workspace/status.txt
15 echo $SERIAL_OUTPUT
16 fi