ci(tests): add test framework (#1603)
This commit is contained in:
parent
934f81182a
commit
89e8b9628c
43 changed files with 1519 additions and 136 deletions
|
|
@ -7,7 +7,7 @@ pkgrel=1
|
|||
pkgdesc="@PROJECT_DESCRIPTION@"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url=@PROJECT_HOMEPAGE_URL@
|
||||
license=('GPL3')
|
||||
license=('GPL-3.0-only')
|
||||
install=sunshine.install
|
||||
|
||||
depends=('avahi'
|
||||
|
|
@ -31,16 +31,21 @@ depends=('avahi'
|
|||
'numactl'
|
||||
'openssl'
|
||||
'opus'
|
||||
'python'
|
||||
'udev')
|
||||
checkdepends=('doxygen'
|
||||
'graphviz')
|
||||
makedepends=('boost'
|
||||
'cmake'
|
||||
'gcc12'
|
||||
'git'
|
||||
'make'
|
||||
'nodejs'
|
||||
'npm')
|
||||
optdepends=('cuda: Nvidia GPU encoding support'
|
||||
'libva-mesa-driver: AMD GPU encoding support'
|
||||
'intel-media-driver: Intel GPU encoding support')
|
||||
'intel-media-driver: Intel GPU encoding support'
|
||||
'xorg-server-xvfb: Virtual X server for headless testing')
|
||||
|
||||
provides=('sunshine')
|
||||
|
||||
|
|
@ -57,6 +62,9 @@ build() {
|
|||
export BUILD_VERSION="@GITHUB_BUILD_VERSION@"
|
||||
export COMMIT="@GITHUB_COMMIT@"
|
||||
|
||||
export CC=gcc-12
|
||||
export CXX=g++-12
|
||||
|
||||
export CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
|
||||
|
|
@ -72,6 +80,14 @@ build() {
|
|||
make -C build
|
||||
}
|
||||
|
||||
check() {
|
||||
export CC=gcc-12
|
||||
export CXX=g++-12
|
||||
|
||||
cd "${srcdir}/build/tests"
|
||||
./test_sunshine --gtest_color=yes
|
||||
}
|
||||
|
||||
package() {
|
||||
make -C build install DESTDIR="$pkgdir"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 644487fc314a069d06219b754b04c39a807ca8d9
|
||||
1
packaging/linux/flatpak/deps/shared-modules
Submodule
1
packaging/linux/flatpak/deps/shared-modules
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d0229951ac23967c4f5697bd7b5c1bd7e641b8c3
|
||||
|
|
@ -34,6 +34,8 @@ build-options:
|
|||
prepend-ld-library-path: /usr/lib/sdk/vala/lib
|
||||
|
||||
modules:
|
||||
- "org.flatpak.Builder.BaseApp/xvfb.json"
|
||||
|
||||
- name: boost
|
||||
disabled: false
|
||||
buildsystem: simple
|
||||
|
|
@ -341,6 +343,7 @@ modules:
|
|||
- -DSUNSHINE_ENABLE_DRM=ON
|
||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||
- -DSUNSHINE_BUILD_FLATPAK=ON
|
||||
- -DTESTS_ENABLE_PYTHON_TESTS=OFF
|
||||
sources:
|
||||
- type: git
|
||||
url: "@GITHUB_CLONE_URL@"
|
||||
|
|
@ -358,3 +361,7 @@ modules:
|
|||
's%/app/bin/sunshine%flatpak run dev.lizardbyte.sunshine\nExecStop=flatpak kill dev.lizardbyte.sunshine%g'
|
||||
/app/share/sunshine/systemd/user/sunshine.service
|
||||
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/scripts/* /app/bin
|
||||
run-tests: true
|
||||
test-rule: "" # empty to disable
|
||||
test-commands:
|
||||
- xvfb-run tests/test_sunshine --gtest_color=yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue