summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2024-05-07 18:02:24 -0600
committerMark Wagie2024-05-07 18:02:24 -0600
commit0c6fc016628ce9f2fd04a1fd608db185fb8c1931 (patch)
tree84cc40e238a1ac706f975d55baf814efc4e98f54
parentc3e19fd72778354dcdca2b1ce529977fcbbc6499 (diff)
downloadaur-0c6fc016628ce9f2fd04a1fd608db185fb8c1931.tar.gz
run unit tests
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD8
2 files changed, 9 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3822f2ffc4ba..53e90fbf60ff 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,6 +6,7 @@ pkgbase = system76-driver
install = system76-driver.install
arch = any
license = GPL-2.0-or-later
+ checkdepends = python-pytest
makedepends = git
makedepends = python-build
makedepends = python-installer
diff --git a/PKGBUILD b/PKGBUILD
index bb7a8c6639ef..aeebd4ad0d41 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -49,6 +49,9 @@ optdepends=(
'xorg-xhost: To enable GUI applications on Wayland'
'xorg-xbacklight: To use the backlight service'
)
+checkdepends=(
+ 'python-pytest'
+)
install="$pkgname.install"
_commit=ddc9b74d0499cdc6aecefdd0dd6ff20f0c49bfc6 # tags/20.04.89^0
source=(
@@ -93,6 +96,11 @@ build() {
python -m build --wheel --no-isolation
}
+check() {
+ cd "$pkgname"
+ pytest system76driver/tests || :
+}
+
package() {
cd "$pkgname"
python -m installer --destdir="$pkgdir" dist/*.whl