buffybox/unl0kr/test/test-uses-drm-backend-if-selected-via-config-and-available.sh
2024-03-31 11:54:18 +02:00

30 lines
429 B
Bash
Executable file

#!/bin/bash
log=tmp.log
conf=tmp.conf
source "$(dirname "${BASH_SOURCE[0]}")/helpers.sh"
function clean_up() {
rm -f "$log" "$conf"
}
trap clean_up EXIT
info "Writing config"
cat << EOF > "$conf"
[general]
backend=drm
EOF
info "Running unl0kr"
run_unl0kr "$log" "$conf"
info "Verifying output"
if ! grep "Using DRM backend" "$log"; then
error "Expected DRM backend to be selected"
cat "$log"
exit 1
fi
ok