Skip to content

Commit

Permalink
Fix dbus test implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
StratusFearMe21 committed Dec 5, 2023
1 parent ee57afa commit 63ac289
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,24 @@ Build requirements:
- glib development files
- gio development files
- libavformat development files
- meson build

Building is very simple using meson
```sh
mkdir build
meson setup build
ninja -C build
sudo ninja -C build install
```

If you don't want to install the plugin to the system, this is how you install the plugin to the user scripts directory
```sh
mkdir build
meson setup build -Dinstall_user=true
ninja -C build
ninja -C build install
```

Building should be as simple as running `make` in the source code directory.

## Test

Expand All @@ -62,8 +78,9 @@ Test requirements:
- jq (for mpv IPC JSON generation and parsing)
- socat (for passing JSON to/from mpv IPC sockets)
- awk (for redirecting parts of mpv stderr logs)
- meson build (the backend for actually running the tests)

Testing should be as simple as running `make test` in the source code directory.
Testing should be as simple as running `ninja test` in the build directory, or `ninja -C build test` in the source directory.

The stderr of the tests will be empty unless there are mpv/etc issues.

Expand Down
1 change: 0 additions & 1 deletion test/env
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,5 @@ TEMPDIR="$MPV_MPRIS_TEST_TMP" \
TMPDIR="$MPV_MPRIS_TEST_TMP" \
TEMP="$MPV_MPRIS_TEST_TMP" \
TMP="$MPV_MPRIS_TEST_TMP" \
dbus-run-session -- \
xvfb-run "$xvfb_auto" --error-file "$MPV_MPRIS_TEST_LOG/$test.xvfb.log" -f "$MPV_MPRIS_TEST_XAUTH/$test.Xauthority" \
"$@"
9 changes: 1 addition & 8 deletions test/wrapper
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/bin/sh
exec dbus-run-session -- "$@"

set -e

# This allows the tests to run in parallel and not conflict
eval `dbus-launch --sh-syntax`

"$@"

kill $DBUS_SESSION_BUS_PID

0 comments on commit 63ac289

Please sign in to comment.