Skip to content

Commit

Permalink
rename target sunshine_tests to test_sunshine
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Mar 24, 2024
1 parent 5ad42be commit 0666bb2
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ jobs:
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
- name: Generate gcov report
# any except canceled or skipped
Expand Down Expand Up @@ -1033,7 +1033,7 @@ jobs:
shell: msys2 {0}
working-directory: build/tests
run: |
./sunshine_tests.exe --gtest_color=yes
./test_sunshine.exe --gtest_color=yes
- name: Generate gcov report
# any except canceled or skipped
Expand Down
2 changes: 1 addition & 1 deletion docker/debian-bookworm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ RUN <<_TEST
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
_TEST

FROM scratch AS artifacts
Expand Down
2 changes: 1 addition & 1 deletion docker/debian-bullseye.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ RUN <<_TEST
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
_TEST

FROM scratch AS artifacts
Expand Down
2 changes: 1 addition & 1 deletion docker/fedora-38.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ RUN <<_TEST
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
_TEST

FROM scratch AS artifacts
Expand Down
2 changes: 1 addition & 1 deletion docker/fedora-39.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ RUN <<_TEST
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
_TEST

FROM scratch AS artifacts
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu-20.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ RUN <<_TEST
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
_TEST

FROM scratch AS artifacts
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ RUN <<_TEST
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
_TEST

FROM scratch AS artifacts
Expand Down
52 changes: 44 additions & 8 deletions docs/source/contributing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,55 @@ can be disabled by setting the `BUILD_TESTS` CMake option to `OFF`.

To run the tests, execute the following command from the build directory:

.. code-block:: bash
.. tab:: Linux

pushd tests
sunshine_tests.exe
popd
.. code-block:: bash
pushd tests
./test_sunshine
popd
.. tab:: macOS

.. code-block:: bash
pushd tests
./test_sunshine
popd
.. tab:: Windows

.. code-block:: bash
pushd tests
test_sunshine.exe
popd
To see all available options, run the tests with the `--help` option.

.. code-block:: bash
.. tab:: Linux

.. code-block:: bash
pushd tests
./test_sunshine --help
popd
.. tab:: macOS

.. code-block:: bash
pushd tests
./test_sunshine --help
popd
.. tab:: Windows

.. code-block:: bash
pushd tests
sunshine_tests.exe --help
popd
pushd tests
test_sunshine.exe --help
popd
Some tests rely on Python to run. CMake will search for Python and enable the docs tests if it is found, otherwise
cmake will fail. You can manually disable the tests by setting the `TESTS_ENABLE_PYTHON_TESTS` CMake option to
Expand Down
2 changes: 1 addition & 1 deletion packaging/linux/Arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ check() {
export CXX=g++-12

cd "${srcdir}/build/tests"
./sunshine_tests --gtest_color=yes
./test_sunshine --gtest_color=yes
}

package() {
Expand Down
2 changes: 1 addition & 1 deletion packaging/linux/flatpak/dev.lizardbyte.sunshine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,4 @@ modules:
run-tests: true
test-rule: "" # empty to disable
test-commands:
- xvfb-run tests/sunshine_tests --gtest_color=yes
- xvfb-run tests/test_sunshine --gtest_color=yes
2 changes: 1 addition & 1 deletion packaging/macos/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ notes-append "See our documentation at 'https://docs.lizardbyte.dev/projects/sun
test.run yes
test.dir ${build.dir}/tests
test.target ""
test.cmd ./sunshine_tests
test.cmd ./test_sunshine
test.args --gtest_color=yes
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13)
# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md#foundational-c-support

project(sunshine_tests)
project(test_sunshine)

set(PYTHON_PREFERRED_VERSION 3.11)
set(PYTHON_MINIMUM_VERSION 3.9)
Expand Down

0 comments on commit 0666bb2

Please sign in to comment.