Debian Codegraph @

launcher/image/test/scripts/test_experiment_value.sh

raw
1 #!/bin/bash
2 set -euo pipefail
3 source util/read_serial.sh
4
5 # This test requires the workload to run and print
6 # corresponding messages to the serial console.
7 SERIAL_OUTPUT=$(read_serial $2 $3)
8 print_serial=false
9
10 if echo $SERIAL_OUTPUT | grep -q "EnableTestFeatureForImage:$1"
11 then
12 echo "- test experiment verified $1"
13 else
14 echo "FAILED: experiment status expected to be $1"
15 echo "TEST FAILED. Test experiment status expected to be $1" > /workspace/status.txt
16 print_serial=true
17 fi
18
19 if $print_serial; then
20 echo $SERIAL_OUTPUT
21 fi