egl: fix _eglMatchDriver() return type
[mesa.git] / .gitlab-ci / bare-metal / expect-output.sh
1 #!/bin/bash
2
3 set -e
4
5 STRINGS=$(mktemp)
6 ERRORS=$(mktemp)
7
8 trap "rm $STRINGS; rm $ERRORS;" EXIT
9
10 FILE=$1
11 shift 1
12
13 while getopts "f:e:" opt; do
14 case $opt in
15 f) echo "$OPTARG" >> $STRINGS;;
16 e) echo "$OPTARG" >> $STRINGS ; echo "$OPTARG" >> $ERRORS;;
17 esac
18 done
19 shift $((OPTIND -1))
20
21 echo "Waiting for $FILE to say one of following strings"
22 cat $STRINGS
23
24 while ! egrep -wf $STRINGS $FILE; do
25 sleep 2
26 done
27
28 if egrep -wf $ERRORS $FILE; then
29 exit 1
30 fi