AtlatestRepositorysigil-wm

sigil-wm / tree / scriptstest-popup-constraints

1#!/usr/bin/env bash
2set -euo pipefail
3cd "$(dirname "$0")/.."
4if [[ ${1:-} != --inside ]]; then
5 exec guix time-machine -C channels.scm -- shell -m manifest.scm -- bash scripts/test-popup-constraints --inside
6fi
7make -j2 all build/popup-client build/popup-constraints
8mkdir -p build/receipts/popup-constraints
9runtime=$(mktemp -d /tmp/sigil-popup-constraints.XXXXXXXX)
10chmod 700 "$runtime"
11trap 'rm -rf "$runtime"' EXIT
12export XDG_RUNTIME_DIR=$runtime WLR_BACKENDS=headless WLR_RENDERER=pixman WLR_HEADLESS_OUTPUTS=2
13unset WAYLAND_DISPLAY DISPLAY
14result=0
15for role in toplevel layer; do
16 for output in 0 1; do
17 rc=0
18 timeout 30 build/popup-constraints "$role" "$output" > "build/receipts/popup-constraints/$role-$output.log" 2>&1 || rc=$?
19 cat "build/receipts/popup-constraints/$role-$output.log"
20 if ((rc)); then result=$rc; fi
21 done
22done
23exit "$result"