Skip to content

Tests: compile into a single executable#2835

Open
lenemter wants to merge 2 commits intomainfrom
lenemter/compile-tests-into-signle-executable
Open

Tests: compile into a single executable#2835
lenemter wants to merge 2 commits intomainfrom
lenemter/compile-tests-into-signle-executable

Conversation

@lenemter
Copy link
Copy Markdown
Member

Closes #2833

Achieves the same performance boost as #2833, but doesn't introduce unnecessary #if conditions

@lenemter lenemter requested a review from leolost2605 April 29, 2026 12:41
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! A few comments :)
Also maybe we should use the glib.test built in way to specify which tests to run? https://valadoc.org/glib-2.0/GLib.Test.init.html says we can just use -p to specify what to run. So we would just construct all testcases, put them in an array and then call test.init and test.run. This would also automatically give us more complete and finegrained control, e.g. to not only specify tests but also skip some, etc. We could also keep the name property if we maybe want to name them differently because we don't rely on the type name then.

Comment thread tests/meson.build Outdated
Comment thread tests/meson.build Outdated
Comment thread tests/meson.build Outdated
Comment thread tests/TestCase.vala
Comment thread tests/TestCase.vala
@lenemter lenemter requested a review from leolost2605 April 29, 2026 15:09
@lenemter
Copy link
Copy Markdown
Member Author

@leolost2605 I don't think it's worth adding name field, at least until we really need it. Currently it's just an unneeded repetition in the code

@lenemter lenemter force-pushed the lenemter/compile-tests-into-signle-executable branch 2 times, most recently from 06d7cec to e3b3482 Compare April 30, 2026 13:03
@lenemter
Copy link
Copy Markdown
Member Author

@leolost2605 for some reason this broke tests for mutter 50. I pushed a commit with a fix to this branch but let me know if you want to merge it separately and I'll create a new PR

@lenemter lenemter force-pushed the lenemter/compile-tests-into-signle-executable branch from e3b3482 to 103e9de Compare April 30, 2026 18:44
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.

Looks good, just a few more comments :)

@leolost2605 for some reason this broke tests for mutter 50. I pushed a commit with a fix to this branch but let me know if you want to merge it separately and I'll create a new PR

Yeah seems like we were doing remove_child (null) there so makes sense. If you clean up the commit history and add the fix as the first commit I think it's fine to merge with this

Comment thread tests/meson.build Outdated
Comment thread tests/Main.vala Outdated
Comment thread tests/MutterTestCase.vala
@lenemter lenemter force-pushed the lenemter/compile-tests-into-signle-executable branch 2 times, most recently from 2e1951d to 4b0eba5 Compare May 3, 2026 20:14
@lenemter
Copy link
Copy Markdown
Member Author

lenemter commented May 3, 2026

@leolost2605 Done!

@lenemter lenemter force-pushed the lenemter/compile-tests-into-signle-executable branch from 4b0eba5 to e525f16 Compare May 3, 2026 20:15
@lenemter lenemter requested a review from leolost2605 May 3, 2026 20:15
@lenemter lenemter force-pushed the lenemter/compile-tests-into-signle-executable branch from e525f16 to 159a70f Compare May 5, 2026 11:00
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