Skip to content
Snippets Groups Projects
Commit 1048c76a authored by Johannes Marbach's avatar Johannes Marbach
Browse files

Merge branch 'johannes/drm-ci' into 'master'

Verify backend on CI

See merge request !16
parents 23a84b3c 7d8da309
No related branches found
No related tags found
No related merge requests found
......@@ -4,20 +4,30 @@ build-buffyboard:
- saas-linux-small-amd64
script:
- apk -q add git build-base meson linux-headers inih-dev libinput-dev eudev-dev
- cd buffyboard
- git submodule init
- git submodule update
- cd buffyboard
- meson _build
- meson compile -C _build
build-unl0kr:
build-and-test-unl0kr-with-drm:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- apk -q add git build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev libdrm-dev scdoc
- apk -q add git bash build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev libdrm-dev scdoc
- git submodule init
- git submodule update
- cd unl0kr
- ./test/test-with-drm.sh
build-and-test-unl0kr-without-drm:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- apk -q add git bash build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev scdoc
- git submodule init
- git submodule update
- meson _build
- meson compile -C _build
- cd unl0kr
- ./test/test-without-drm.sh
......@@ -406,6 +406,7 @@ int main(int argc, char *argv[]) {
switch (conf_opts.general.backend) {
#if LV_USE_LINUX_FBDEV
case UL_BACKENDS_BACKEND_FBDEV:
bbx_log(BBX_LOG_LEVEL_VERBOSE, "Using framebuffer backend");
disp = lv_linux_fbdev_create();
lv_linux_fbdev_set_file(disp, "/dev/fb0");
if (conf_opts.quirks.fbdev_force_refresh) {
......@@ -415,6 +416,7 @@ int main(int argc, char *argv[]) {
#endif /* LV_USE_LINUX_FBDEV */
#if LV_USE_LINUX_DRM
case UL_BACKENDS_BACKEND_DRM:
bbx_log(BBX_LOG_LEVEL_VERBOSE, "Using DRM backend");
disp = lv_linux_drm_create();
lv_linux_drm_set_file(disp, "/dev/dri/card0", -1);
break;
......
#!/bin/bash
rm -rf _build
meson _build
meson compile -C _build
#!/bin/bash
rm -rf _build
meson _build -Dwith-drm=disabled
meson compile -C _build
#!/bin/bash
function info() {
echo -e "[Info] $1"
}
function error() {
echo -e "\e[31m[Error]\e[0m $1"
}
function ok() {
echo -e "\e[32m[Ok]\e[0m $1"
}
function run_unl0kr() {
local log=$1
local conf=$2
./_build/unl0kr -v -C "$conf" > "$log" 2>&1 &
pid=$!
sleep 3
kill -9 $pid
wait $pid > /dev/null 2>&1
}
#!/bin/bash
root=$(dirname "${BASH_SOURCE[0]}")
"$root/test-with-drm.sh"
"$root/test-without-drm.sh"
#!/bin/bash
log=tmp.log
conf=tmp.conf
source "$(dirname "${BASH_SOURCE[0]}")/helpers.sh"
function clean_up() {
rm -f "$log" "$conf"
}
trap clean_up EXIT
info "Writing config"
cat << EOF > "$conf"
[general]
backend=drm
EOF
info "Running unl0kr"
run_unl0kr "$log" "$conf"
info "Verifying output"
if ! grep "Using DRM backend" "$log"; then
error "Expected DRM backend to be selected"
cat "$log"
exit 1
fi
ok
#!/bin/bash
log=tmp.log
source "$(dirname "${BASH_SOURCE[0]}")/helpers.sh"
function clean_up() {
rm -f "$log"
}
trap clean_up EXIT
info "Running unl0kr"
run_unl0kr "$log"
info "Verifying output"
if ! grep "Using framebuffer backend" "$log"; then
error "Expected framebuffer backend to be selected"
cat "$log"
exit 1
fi
ok
#!/bin/bash
log=tmp.log
conf=tmp.conf
source "$(dirname "${BASH_SOURCE[0]}")/helpers.sh"
function clean_up() {
rm -f "$log" "$conf"
}
trap clean_up EXIT
info "Writing config"
cat << EOF > "$conf"
[general]
backend=drm
EOF
info "Running unl0kr"
run_unl0kr "$log" "$conf"
info "Verifying output"
if ! grep "Using framebuffer backend" "$log"; then
error "Expected framebuffer backend to be selected"
cat "$log"
exit 1
fi
ok
#!/bin/bash
log=tmp.log
conf=tmp.conf
source "$(dirname "${BASH_SOURCE[0]}")/helpers.sh"
function clean_up() {
rm -f "$log" "$conf"
}
trap clean_up EXIT
info "Writing config"
cat << EOF > "$conf"
[general]
backend=fb
EOF
info "Running unl0kr"
run_unl0kr "$log" "$conf"
info "Verifying output"
if ! grep "Using framebuffer backend" "$log"; then
error "Expected framebuffer backend to be selected"
cat "$log"
exit 1
fi
ok
#!/bin/bash
root=$(dirname "${BASH_SOURCE[0]}")
source "$root/helpers.sh"
function run() {
info "Executing $1"
"$1"
echo
}
run "$root/build-with-drm.sh"
run "$root/test-uses-fb-backend-by-default.sh"
run "$root/test-uses-fb-backend-if-selected-via-config.sh"
run "$root/test-uses-drm-backend-if-selected-via-config-and-available.sh"
#!/bin/bash
root=$(dirname "${BASH_SOURCE[0]}")
source "$root/helpers.sh"
function run() {
info "Executing $1"
"$1"
echo
}
run "$root/build-without-drm.sh"
run "$root/test-uses-fb-backend-by-default.sh"
run "$root/test-uses-fb-backend-if-selected-via-config.sh"
run "$root/test-uses-fb-backend-if-drm-selected-via-config-but-unavailable.sh"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment