[gnome-games] tools: Add a script for running tests



commit 7285c9ce162388e0373a3384d1a50a305e9d29ae
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Feb 27 18:20:51 2020 +0500

    tools: Add a script for running tests

 tools/run-tests.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
---
diff --git a/tools/run-tests.sh b/tools/run-tests.sh
new file mode 100755
index 00000000..7803fb76
--- /dev/null
+++ b/tools/run-tests.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+WORK_DIR="unit-tests"
+MANIFEST_PATH="../../flatpak/org.gnome.Games.UnitTests.yml"
+FLATPAK_MODULE="retro-gtk"
+FLATPAK_BUILD_DIR="unit-tests"
+MESON_ARGS="--libdir=lib -Dinstall-tests=true"
+
+mkdir -p $WORK_DIR
+cd $WORK_DIR
+
+rm -rf ${FLATPAK_BUILD_DIR}
+flatpak-builder --repo=repo ${FLATPAK_BUILD_DIR} ${MANIFEST_PATH}
+
+if [[ -z "${DISPLAY}" ]]; then
+    xvfb-run -a -s "-screen 0 1024x768x24" flatpak-builder --run ${FLATPAK_BUILD_DIR} ${MANIFEST_PATH} 
games-unit-tests
+else
+    flatpak-builder --run ${FLATPAK_BUILD_DIR} ${MANIFEST_PATH} games-unit-tests
+fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]