Skip to content

Tests: avoid recompiling libgala for each test#2833

Open
lenemter wants to merge 1 commit intomainfrom
lenemter/dont-rebuild-lib-for-tests
Open

Tests: avoid recompiling libgala for each test#2833
lenemter wants to merge 1 commit intomainfrom
lenemter/dont-rebuild-lib-for-tests

Conversation

@lenemter
Copy link
Copy Markdown
Member

@lenemter lenemter commented Apr 26, 2026

Reuse libgala library instead of compiling a test + libgala into every test executable.

Because of this change I introduced a TESTS preprocessor variable to expose needed internal parts of the library to the tests.

This should significantly speed up compilation for large numbers of tests.

@lenemter lenemter requested a review from leolost2605 April 26, 2026 18:36
@lenemter lenemter force-pushed the lenemter/dont-rebuild-lib-for-tests branch 2 times, most recently from 69706c8 to a761b67 Compare April 26, 2026 18:44
@lenemter lenemter force-pushed the lenemter/dont-rebuild-lib-for-tests branch from a761b67 to ac4fe82 Compare April 26, 2026 18:46
Copy link
Copy Markdown
Member

@leolost2605 leolost2605 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me but I think we should use a separate new library so that enabling tests doesn't change anything about the actual one. Also the #if TESTS arent really nice, is there a way to do it without introducing a lot of these conditions? Maybe have a macro that evaluates to private or public? Does vala support that?

@leolost2605
Copy link
Copy Markdown
Member

Just a quick google didn't investigate further but maybe --internal-vapi and friends might work?

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.

2 participants