mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Start dbus in the container for being able to run the test suite
We don't need a full systemd service, just dbus-daemon to be started. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
12
circle.yml
12
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user