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

Run tests against installed rgbds, not on built binaries #1612

Open
avivace opened this issue Jan 16, 2025 · 5 comments · May be fixed by #1621
Open

Run tests against installed rgbds, not on built binaries #1612

avivace opened this issue Jan 16, 2025 · 5 comments · May be fixed by #1621
Assignees
Labels
builds This affects the build process or release artifacts tests This affects the test suite
Milestone

Comments

@avivace
Copy link
Member

avivace commented Jan 16, 2025

In the CI we're setting up to package for Debian, we need to run the tests against the installed package, not on the built executable, so "run-tests.sh" fails because it checks for the compiled binaries in the parent directory (

# Refuse to run if RGBDS isn't present
)

We could add a flag that runs "run-tests" expecting the executables to be found in the path, without checking for the built binaries..

cc @robbi-blechdose

@pinobatch
Copy link
Member

test_downstream() in tests/run-tests.sh passes a Make variable RGBDS to the repositories that it builds. This points to the prefix of the RGBDS build under test. So we'd need a variable that defaults to "$(realpath ..)" but which a caller can override. For example, to test installed RGBDS, the caller would override it with something like "$(dirname "$(command -v rgbasm)")". Should this variable be passed to tests/run-tests.sh as a command-line option or as an environment variable?

@Rangi42 Rangi42 added tests This affects the test suite builds This affects the build process or release artifacts labels Jan 16, 2025
@Rangi42 Rangi42 added this to the 0.9.1 milestone Jan 16, 2025
@Rangi42
Copy link
Contributor

Rangi42 commented Jan 16, 2025

I'd go with a CLI option: run-tests.sh --rgbds ../path/.

@robbi-blechdose
Copy link
Contributor

I believe neither of those is necessary.
The makefiles default to the rgbds installation in PATH, meaning a simple switch to disable the RGBDS variable assignment should do the trick.

@Rangi42
Copy link
Contributor

Rangi42 commented Jan 18, 2025

I was going to suggest "just do cp $(which rgb{asm,link,fix,gfx}) . and then run the tests normally", but then saw that your rgbds-tests script has a line very similar to that already commented out (#cp build/src/rgbasm build/src/rgblink build/src/rgbfix build/src/rgbgfx .) Why, did it not work, or did the Debian maintainers say not to?

@robbi-blechdose
Copy link
Contributor

This was part of an older test script (and I should honestly remove it).
I'd like to test against the system installation and not copied binaries for the most accurate results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds This affects the build process or release artifacts tests This affects the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants