Skip to content

Add an automated test#242

Merged
slouken merged 2 commits intolibsdl-org:mainfrom
smcv:automated-test
May 20, 2022
Merged

Add an automated test#242
slouken merged 2 commits intolibsdl-org:mainfrom
smcv:automated-test

Conversation

@smcv
Copy link
Copy Markdown
Contributor

@smcv smcv commented May 19, 2022

  • Add a simple automated test

    This loads and saves various supported formats, and asserts that the
    same pixels (or close enough) end up in the output files.

    For a distribution that knows it intends to support particular formats,
    if an environment variable like SVG_IMAGE_TEST_REQUIRE_LOAD_JPG or
    SVG_IMAGE_TEST_REQUIRE_SAVE_JPG is set, the test will fail if the given
    format is not available.

  • workflows: Run the new automated test for Autotools

    I haven't set it up for CMake yet (although it does work) because that
    would conflict pretty badly with Improve CMake build system #238.


The idea is that in Debian, I would set (for example) SVG_IMAGE_TEST_REQUIRE_LOAD_JPG=1 and SVG_IMAGE_TEST_REQUIRE_SAVE_JPG=1, because I know that for the build in Debian, JPEG should always be supported, even if for a generic upstream build we can't guarantee that JPEG support will be enabled.

@smcv smcv force-pushed the automated-test branch 8 times, most recently from 2b32b1e to 15fdf1e Compare May 19, 2022 17:39
@smcv smcv marked this pull request as ready for review May 19, 2022 17:42
@smcv smcv marked this pull request as draft May 19, 2022 17:45
@smcv smcv force-pushed the automated-test branch from 15fdf1e to f7cdd6e Compare May 19, 2022 17:48
@smcv smcv marked this pull request as ready for review May 19, 2022 17:49
@smcv
Copy link
Copy Markdown
Contributor Author

smcv commented May 19, 2022

https://github.com/smcv/SDL_image/tree/automated-test-cmake is the workflows glue to exercise this for CMake as well, but it will conflict with #238.

I think ideally we perhaps want the CMake test to build SDL_image as a shared library, but build the vendored dependencies as static libraries, since that's what someone who is vendoring the dependencies would probably want to do? But I'm not sure how to achieve that (or even whether it's possible without #238).

@madebr
Copy link
Copy Markdown
Contributor

madebr commented May 20, 2022

Don't let my cmake pr block this one.
I'm currently working on SDL_mixer on and off.
Your suggestion of always building vendored dependencies as static libraries sounds good. It would also mean disabling dynamic loading.

@smcv smcv mentioned this pull request May 20, 2022
smcv and others added 2 commits May 20, 2022 15:28
This loads and saves various supported formats, and asserts that the
same pixels (or close enough) end up in the output files.

For a distribution that knows it intends to support particular formats,
if an environment variable like SVG_IMAGE_TEST_REQUIRE_LOAD_JPG or
SVG_IMAGE_TEST_REQUIRE_SAVE_JPG is set, the test will fail if the given
format is not available.

Signed-off-by: Simon McVittie <smcv@debian.org>
I haven't set it up for CMake yet (although it does work) because that
would conflict pretty badly with libsdl-org#238.

Signed-off-by: Simon McVittie <smcv@collabora.com>
@smcv smcv force-pushed the automated-test branch from f7cdd6e to 78459c0 Compare May 20, 2022 14:28
@slouken slouken merged commit 734780f into libsdl-org:main May 20, 2022
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

Successfully merging this pull request may close these issues.

3 participants