From 5b46d2dfd28f322ce61ad04a5db9256be32450c9 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 14 Dec 2023 22:57:38 -0700 Subject: [PATCH] Fix up build and add automated tests --- .github/workflows/build.yml | 26 ++++++++++++++----- Makefile | 9 ++++--- .../system-service/wpa_supplicant.cpp | 1 - package | 2 +- shared/liboxide/devicesettings.cpp | 2 -- tests/liboxide/liboxide.pro | 2 ++ 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c253f2da..c313fd7fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,9 +61,18 @@ jobs: needs: [build] steps: - uses: actions/download-artifact@v3 - id: download + id: repo with: name: repo + - uses: actions/download-artifact@v3 + id: build + with: + name: build + - name: Copy tests + run: | + cp -al \ + ${{ steps.build.outputs.download-path }}/opt/share/tests \ + ${{ steps.repo.outputs.download-path }} - uses: Eeems-Org/run-in-remarkable-action@v1 with: setup: | @@ -73,12 +82,15 @@ jobs: set -ex echo Y | toltecctl generate-opkg-conf opkg update - opkg install oxide - # systemctl disable --now xochitl - # systemctl enable --now tarnish - # TODO install and run tests - opkg remove --force-removal-of-dependent-packages liboxide - path: ${{ steps.download.outputs.download-path }} + opkg install oxide oxide-extra inject_evdev liboxide-dev + # TODO test tarnish service + ls tests | while read test; do + pushd tests/$test + tests/$test/$test + popd + done + opkg remove --force-removal-of-dependent-packages liboxide libsentry + path: ${{ steps.repo.outputs.download-path }} release: needs: [build,test] if: ${{ github.ref == 'refs/heads/master' }} diff --git a/Makefile b/Makefile index 16e2083e5..b66d92006 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,13 @@ endif OBJ += $(BUILD)/oxide/Makefile -clean: - rm -rf $(DIST) $(BUILD) +clean-base: + rm -rf $(DIST) $(BUILD)/oxide -release: clean build $(DIST) +clean: clean-base + rm -rf $(BUILD) + +release: clean-base build $(DIST) # Force sentry makefile to regenerate so that install targets get when being build in toltecmk cd $(BUILD)/oxide/shared/sentry && make qmake # Force liboxide makefile to regenerate so that install targets get when being build in toltecmk diff --git a/applications/system-service/wpa_supplicant.cpp b/applications/system-service/wpa_supplicant.cpp index d4631dfd5..f5b5bc495 100644 --- a/applications/system-service/wpa_supplicant.cpp +++ b/applications/system-service/wpa_supplicant.cpp @@ -63,4 +63,3 @@ FiW1Wpa_supplicant1NetworkInterface::~FiW1Wpa_supplicant1NetworkInterface() { } -#include "moc_wpa_supplicant.cpp" diff --git a/package b/package index 56a598cf7..bd0c6651b 100644 --- a/package +++ b/package @@ -193,7 +193,7 @@ liboxide-dev() { installdepends=("liboxide=$pkgver") package() { - install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/liboxide.pc + install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/oxide.pc install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/epframebuffer.h install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/liboxide.h cp -ar "$srcdir"/release/opt/include/liboxide/ "$pkgdir"/opt/include/ diff --git a/shared/liboxide/devicesettings.cpp b/shared/liboxide/devicesettings.cpp index 16bad0d94..11e0399fa 100644 --- a/shared/liboxide/devicesettings.cpp +++ b/shared/liboxide/devicesettings.cpp @@ -456,5 +456,3 @@ namespace Oxide { return _virtualScreenGeometry; } } - -#include "moc_devicesettings.cpp" diff --git a/tests/liboxide/liboxide.pro b/tests/liboxide/liboxide.pro index 585befc03..e311e583a 100644 --- a/tests/liboxide/liboxide.pro +++ b/tests/liboxide/liboxide.pro @@ -2,12 +2,14 @@ QT += testlib QT += gui target.path = /opt/share/tests/liboxide/liboxide +INSTALLS += target CONFIG += qt CONFIG += console CONFIG += warn_on CONFIG += depend_includepath CONFIG += testcase +CONFIG += no_testcase_installs CONFIG -= app_bundle TEMPLATE = app