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

[Question] Test amiberry binary without any screen attached #1142

Closed
MichaIng opened this issue Nov 2, 2023 · 4 comments
Closed

[Question] Test amiberry binary without any screen attached #1142

MichaIng opened this issue Nov 2, 2023 · 4 comments
Assignees

Comments

@MichaIng
Copy link
Contributor

MichaIng commented Nov 2, 2023

For DietPi, we added a test workflows to test all software options we provide via GitHub Actions. Naturally GUI/video software cannot be tested thoroughly, but we then usually test the CLI version or help output instead, to at least assure the needed shared libraries are present and the binary generally works.

For Amiberry we added the amiberry -h command. However, while I thought this worked in the past in a headless container, it does not anymore (probably it never did, not 100% sure):

Internal error; file src/osdep/amiberry.cpp, line 3692
Aborted

This line tires to initialise SDL, which fails, as there is no video device. I guess we could solve this SDL-wise by compiling with --enable-video-dummy (respectively without disabling it explicitly), but it would be great to have an Amiberry CLI command which does not actually try to initialise SDL, For --help/-h or a potential --version/-v it would not be needed.

Not a high priority, but probably it makes sense in general to minimise overhead for CLI commands which do not actually start any GUI or emulation. Or probably there is already a way I missed?

EDIT: For completeness: amiberry -h works well in a headless container with RPi DispmanX builds, as this bypasses SDL for vast parts. Any SDL/OpenGLES/OpenGL target build does not work as fast as a screen is detached for a real SBC, i.e. not in headless systems or containers only.

@giantclambake
Copy link

giantclambake commented Nov 3, 2023

Reading the preamble here -- https://github.com/zielmicha/SDL2/blob/master/src/video/dummy/SDL_nullvideo.c -- it would seem possible, but a quick glimpse for SDL_VIDEO_DRIVER_DUMMY reveals this is not (yet) implemented in the amiberry tree.

If that were made so, the option could be made available in amiberry.conf ... or a cmdline option one supposes.

I don't know of/can see any way for amiberry to currently do what you're after =)

Obviously this is just a comment, and midwan is the only one who can answer your question -grin-

@midwan midwan self-assigned this Nov 3, 2023
@midwan
Copy link
Collaborator

midwan commented Nov 3, 2023

with b4f1bd9 on master, the -h and --help parameters are checked very early, before SDL2 is initialized, so you can get the usage output instantly if you ask for it. :)

@midwan midwan closed this as completed Nov 3, 2023
@MichaIng
Copy link
Contributor Author

MichaIng commented Nov 3, 2023

Many thanks @midwan, I will test it the next days, at latest after next Amiberry release.

@MichaIng
Copy link
Contributor Author

It works great with the latest version, many thanks 👍!

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

No branches or pull requests

3 participants