Skip to content

Commit

Permalink
Merge branch 'silent-x11test-v'
Browse files Browse the repository at this point in the history
* Branch commit log:
  Makefile.mk: use null devices for x11test-v
  x11test/replay.sh: use null devices unless -p is given

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Jun 19, 2024
2 parents c53a3f9 + 624f596 commit 4dbb087
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ x11test x11test-v: $(x11test/files.json) $(lib/AnklangSynthEngine)
$Q mkdir -p $>/x11test/
$Q $(CP) $(x11test/files.json) $>/x11test/
$Q cd $>/x11test/ \
&& { test "$@" == x11test-v && H=-v || H= ; } \
&& { test "$@" == x11test-v && OPT=-v || OPT=-p ; } \
&& for json in *.json ; do \
echo "$$json" \
&& $(abspath x11test/replay.sh) $$H $$json || exit $$? \
&& $(abspath x11test/replay.sh) $$OPT $$json || exit $$? \
; done
CLEANDIRS += $>/x11test/
.PHONY: x11test x11test-v
Expand Down
5 changes: 4 additions & 1 deletion x11test/replay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ X11TEST="${SCRIPTNAME%/*}"

# parse CLI
OPTS=-w
NODEVS="-P null -M null"
while [[ "${1:-}" = -* ]] ; do
case "$1" in
-v) OPTS=-v ;;
-w) OPTS=-w ;;
-p) NODEVS= ;;
-h) cat <<-_EOF
Usage: replay.sh [OPTIONS] <play.json>
Replay a DevTools recording in Electron via Puppetteer
with AnklangSynthEngine running as server.
-h Display brief usage
-v Use virtual X11 server for headless recording
-w Use nested X11 window as server
-p Use realy PCM/MIDI devices
_EOF
exit 0 ;;
*) die "unknown option: $1"
Expand All @@ -39,7 +42,7 @@ cp $X11TEST/epuppeteer.mjs .

# Start Anklang engine
test -x $X11TEST/../out/lib/AnklangSynthEngine || die "missing executable:" AnklangSynthEngine
$X11TEST/../out/lib/AnklangSynthEngine &
$X11TEST/../out/lib/AnklangSynthEngine $NODEVS &

# Replay in ELectron and record X11 session
EXITSTATUS=0
Expand Down

0 comments on commit 4dbb087

Please sign in to comment.