commit 1c27435169ad8d2434d1d47928bc0dba21417325
parent 352e5977d9f76a2e45191c8e0b4be965fa7f40b9
Author: Georges Dupéron <georges.duperon@gmail.com>
Date: Tue, 3 Jul 2018 00:00:32 +0200
Changed the xvfb resolution so that the window title bar is visible, removed fluxbox's background picture
Diffstat:
3 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml
@@ -53,7 +53,7 @@ install:
script:
- (cd example-os && make)
- - ./utils/gui-wrapper.sh ./test/${MODE}.sh
+ - ./utils/gui-wrapper.sh 800x600x24 ./test/${MODE}.sh
- |
./utils/auto-push.sh "https://github.com/jsmaniac/travis-os.git" \
"git@github.com:jsmaniac/travis-os-deploy-artifacts.git" \
diff --git a/example-os/Makefile b/example-os/Makefile
@@ -13,16 +13,16 @@ test: test-qemu-system-i386 test-qemu-system-arm test-virtualbox test-bochs Make
.PHONY: test-qemu-system-i386
test-qemu-system-i386: os.sh ../deploy-screenshots Makefile
- (cd .. && xvfb-run -a ./test/qemu-system-i386.sh)
+ (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/qemu-system-i386.sh)
.PHONY: test-qemu-system-arm
test-qemu-system-arm: os.sh ../deploy-screenshots Makefile
- (cd .. && xvfb-run -a ./test/qemu-system-arm.sh)
+ (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/qemu-system-arm.sh)
.PHONY: test-virtualbox
test-virtualbox: os.sh ../deploy-screenshots Makefile
- (cd .. && xvfb-run -a ./test/virtualbox.sh)
+ (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/virtualbox.sh)
.PHONY: test-bochs
test-bochs: os.sh ../deploy-screenshots Makefile
- (cd .. && xvfb-run -a ./test/bochs.sh)
+ (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/bochs.sh)
diff --git a/utils/gui-wrapper.sh b/utils/gui-wrapper.sh
@@ -1,2 +1,21 @@
#!/bin/sh
-xvfb-run -a sh -c 'fluxbox 2>/dev/null & sleep 3; "$@"' utils/gui-wrapper.sh-subshell "$@"
-\ No newline at end of file
+
+resolution="$1" # e.g. 800x600x24 (width x height x bits_per_pixel)
+shift # the following arguments are the program to execute and its arguments
+
+bg="$(mktemp --suffix='bg.png')"
+fb_cfg="$(mktemp --suffix='fluxbox.cfg')"
+
+# Create solid black background
+convert -size 16x16 xc:black "$bg"
+
+# Create minimalist fluxbox configuration
+cat > "$fb_cfg" <<EOF
+background: fullscreen
+background.pixmap: $bg
+EOF
+
+xvfb-run -a --server-args="-screen 0 ${resolution}" sh -c 'fluxbox -rc '"$fb_cfg"' 2>/dev/null & sleep 3; "$@"' utils/gui-wrapper.sh-subshell "$@"
+
+# Cleanup
+rm "$bg" "$fb_cfg"
+\ No newline at end of file