diff --git a/circle.yml b/circle.yml index 5e558735..ec802b05 100644 --- a/circle.yml +++ b/circle.yml @@ -45,12 +45,18 @@ libratbag_references: name: Ninja scan-build environment: NINJA_ARGS: scan-build + start_dbus: &start_dbus + run: + name: Start dbus daemon + command: | + mkdir /run/dbus + /usr/bin/dbus-daemon --system --fork fedora_install: &fedora_install run: name: Install prerequisites - command: dnf install -y tree git gcc gcc-c++ meson check-devel libudev-devel libevdev-devel doxygen graphviz valgrind python3-gobject + command: dnf install -y tree git gcc gcc-c++ meson check-devel libudev-devel libevdev-devel doxygen graphviz valgrind python3-gobject python3-evdev fedora_settings: &fedora_settings @@ -58,6 +64,7 @@ fedora_settings: &fedora_settings steps: - *fedora_install - checkout + - *start_dbus - *build_and_test - *install - *check_uninstall @@ -74,8 +81,9 @@ ubuntu_settings: &ubuntu_settings apt-get install -y software-properties-common add-apt-repository universe apt-get update - apt-get install -y tree git gcc g++ pkg-config meson check libudev-dev libevdev-dev libsystemd-dev doxygen graphviz valgrind python3-gi + apt-get install -y tree git gcc g++ pkg-config meson check libudev-dev libevdev-dev libsystemd-dev doxygen graphviz valgrind python3-gi python3-evdev - checkout + - *start_dbus - *build_and_test - *install - *check_uninstall diff --git a/meson.build b/meson.build index ec24f9cc..6d9e83cf 100644 --- a/meson.build +++ b/meson.build @@ -516,8 +516,8 @@ configure_file(input : 'tools/ratbagctl.devel.in', configure_file(input : 'tools/ratbagctl.test.in', output : 'ratbagctl.test', configuration : config_ratbagctl_devel) -ratbagctl_test_wrapper = find_program('tools/ratbagctl.test.wrapper') -test('ratbagctl-test', ratbagctl_test_wrapper, args: [meson.build_root()]) +ratbagctl_test = find_program('build/ratbagctl.test') +test('ratbagctl-test', ratbagctl_test, args: ['-v']) #### output files #### configure_file(output: 'config.h', install: false, configuration: config_h) diff --git a/tools/ratbagctl.test.wrapper b/tools/ratbagctl.test.wrapper deleted file mode 100755 index c0294711..00000000 --- a/tools/ratbagctl.test.wrapper +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Wrapper to execute ratbagctl.test. Required because meson does not allow -# a configure_file() output to be used as test. And besides, we need to run -# this as root anyway. -# -if [ `whoami` != "root" ]; then - echo "This test must be run as root" - # Skippedy skip skip - exit 77 -fi - -if ! [ -z "$CIRCLECI" ]; then - echo "CircleCI does not have DBus. Skipping test" - # Skippedy skip skip - exit 77 -fi - -MESON_BUILD_ROOT="$1" - -"$MESON_BUILD_ROOT"/ratbagctl.test