We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5072 - Test resources missing when building with SDL_TEST and CMake
Summary: Test resources missing when building with SDL_TEST and CMake
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 10
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-04 12:19 UTC by DominikD
Modified: 2020-04-05 15:47 UTC (History)
0 users

See Also:


Attachments
changes to CMakeLists.txt to account for missing resources (616 bytes, patch)
2020-04-04 12:19 UTC, DominikD
Details | Diff
single line change (711 bytes, patch)
2020-04-04 12:43 UTC, DominikD
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DominikD 2020-04-04 12:19:21 UTC
Created attachment 4286 [details]
changes to CMakeLists.txt to account for missing resources

There are several tests that need resources in the output directory to work:
* `testiconv` depends on `utf8.txt`
* `testoverlay2` and `teststreaming` depend on `moose.dat`

This patch adds these two files to the `RESOURCE_FILES` variable.

One could also copy `shapes\*.bmp` over to the output directory for `testshape` to use but this patch doesn't do that for three reasons:
* executable takes path as an argument and doesn't need these files side by side
* these are ~45MB and copying them over would cause build directory to swell
* there are already files in the output directory that can be used with this test (`sample.bmp` and `button.bmp`)

Patch attached. Filed in `don't know` since there's no `test` component.
Comment 1 DominikD 2020-04-04 12:43:00 UTC
Actually I thought about it and there's even simpler fix. Patch attached.
Comment 2 DominikD 2020-04-04 12:43:51 UTC
Created attachment 4287 [details]
single line change
Comment 3 Sam Lantinga 2020-04-05 15:47:25 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/4897f7f06e52
Comment 4 Sam Lantinga 2020-04-05 15:47:40 UTC
This is now fixed.