Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.11.2: test suite is failing #9220

Closed
kloczek opened this issue May 8, 2021 · 8 comments
Closed

1.11.2: test suite is failing #9220

kloczek opened this issue May 8, 2021 · 8 comments

Comments

@kloczek
Copy link

kloczek commented May 8, 2021

I'm trying to execute test suite during assebly rpm package and to provide $DISPLAY I'm executing ctest over xvfb-run

+ xvfb-run -a /usr/bin/make -O -j48 V=1 VERBOSE=1 -C x86_64-redhat-linux-gnu test ARGS=--output-on-failure
make: Entering directory '/home/tkloczko/rpmbuild/BUILD/openttd-1.11.2/x86_64-redhat-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process --output-on-failure
Test project /home/tkloczko/rpmbuild/BUILD/openttd-1.11.2/x86_64-redhat-linux-gnu
    Start 1: regression_regression
1/2 Test #1: regression_regression ............***Failed    0.09 sec
1: -
1: + Error: Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.'
2: - --TestInit--
2: + '
(9366 lines were expected but 2 were found)
CMake Error at /home/tkloczko/rpmbuild/BUILD/openttd-1.11.2/cmake/scripts/Regression.cmake:105 (message):
  Regression failed - Output in
  /home/tkloczko/rpmbuild/BUILD/openttd-1.11.2/x86_64-redhat-linux-gnu/regression_regression_output.txt



    Start 2: regression_stationlist
2/2 Test #2: regression_stationlist ...........***Failed    0.07 sec
1: -
1: + Error: Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.'
2: - --StationList--
2: + '
(128 lines were expected but 2 were found)
CMake Error at /home/tkloczko/rpmbuild/BUILD/openttd-1.11.2/cmake/scripts/Regression.cmake:105 (message):
  Regression failed - Output in
  /home/tkloczko/rpmbuild/BUILD/openttd-1.11.2/x86_64-redhat-linux-gnu/regression_stationlist_output.txt

0% tests passed, 2 tests failed out of 2

May I ask for some hints about what I'm doing wrongly?

@LordAro
Copy link
Member

LordAro commented May 8, 2021

As the error message suggests, the tests still require a graphics set to run (as they're actually just running the game). OpenGFX works well (which is what we use in the CI), or if you're really interested in minimalism, you can find a "nogfx" variant somewhere around the internet

@LordAro
Copy link
Member

LordAro commented May 8, 2021

Oh, and despite it needing the "graphics", it doesn't actually render anything, so xvfb is unnecessary

@TrueBrain
Copy link
Member

I assume the above helped you out. If not, here some more snippets:

https://github.com/OpenTTD/OpenTTD/blob/master/.github/workflows/ci-build.yml#L113

This is what we do to get OpenGFX running, and making a graphics set available for the regression test.

Feel free to reopen if that doesn't fix your issue!

@kloczek
Copy link
Author

kloczek commented May 10, 2021

I assume the above helped you out. If not, here some more snippets:

Issue is that all my build systems are intentionally cut off from public network.
Is it possible to point to system installed OpenGFX?

@TrueBrain
Copy link
Member

TrueBrain commented May 10, 2021

Any way you can feed OpenGFX on the system will work fine. As long as the game can find it in any search-path, it will pick up on it. So if you have another way to get it in ~/.local/share/openttd/baseset for example, it will work just fine! (or the global variant ofc, but I always forget the exact path .. /usr/share/.. something :D)

@kloczek
Copy link
Author

kloczek commented Aug 30, 2022

I've been trying to run test suite over xv-fb and it does not work

+ cd OpenTTD-12.2
+ xvfb-run -a /usr/bin/make -O -j48 V=1 VERBOSE=1 -C x86_64-redhat-linux-gnu test ARGS=--output-on-failure
make: Entering directory '/home/tkloczko/rpmbuild/BUILD/OpenTTD-12.2/x86_64-redhat-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process --output-on-failure
Test project /home/tkloczko/rpmbuild/BUILD/OpenTTD-12.2/x86_64-redhat-linux-gnu
    Start 1: regression_regression
1/2 Test #1: regression_regression ............***Failed    0.10 sec
1: -
1: + Error: Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.'
2: - --TestInit--
2: + '
(9539 lines were expected but 2 were found)
CMake Error at /home/tkloczko/rpmbuild/BUILD/OpenTTD-12.2/cmake/scripts/Regression.cmake:105 (message):
  Regression failed - Output in
  /home/tkloczko/rpmbuild/BUILD/OpenTTD-12.2/x86_64-redhat-linux-gnu/regression_regression_output.txt



    Start 2: regression_stationlist
2/2 Test #2: regression_stationlist ...........***Failed    0.08 sec
1: -
1: + Error: Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.'
2: - --StationList--
2: + '
(128 lines were expected but 2 were found)
CMake Error at /home/tkloczko/rpmbuild/BUILD/OpenTTD-12.2/cmake/scripts/Regression.cmake:105 (message):
  Regression failed - Output in
  /home/tkloczko/rpmbuild/BUILD/OpenTTD-12.2/x86_64-redhat-linux-gnu/regression_stationlist_output.txt




0% tests passed, 2 tests failed out of 2

Total Test time (real) =   0.18 sec

The following tests FAILED:
          1 - regression_regression (Failed)
          2 - regression_stationlist (Failed)
Errors while running CTest

@James103
Copy link
Contributor

Error: Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.

Install OpenGFX in the test suite environment, then retry the text suite.

@nielsmh
Copy link
Contributor

nielsmh commented Aug 30, 2022

Additionally, the test suite runs using the 'null' video driver and does not attempt to actually open any windows or draw any graphics. It does not need X11 or Wayland or other graphical display system available, but the game logic requires a graphics set to be loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants