Modular Tests#67
Open
Roudenn wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About the PR
Added support for modular tests and
Content.Goobstation.IntegrationTestsproject.Why
In a perfect world, any compicated enough open source code needs integration tests. Modules can't be tested right now because of their independency and making a subfolder in Content.IntegrationTests is stupid.
Technical details
Each modular test is a normal IntegrationTest project that directly references all modules in its own module folder.
Other modules are also loaded during the test, but testing code cannot reference types from them directly, because there's no project reference to them during compilation and they are copied to the bin folder instead.
In order to launch integration test project from the Modules folder, a loophole in Content.Benchmarks is used: since it's able to access internal types of RobustToolbox, it also can change the relative root in
ProgramShared, allowing the project to start up correctly.This is horrible and may be patched someday, but I hope by the time when it's fixed RT will provide a way to change the root offset safely.
Test plan
Requirements
Breaking changes
PoolManager's module discovery now accounts if the launched project is already located in the Modules/ folder and loads all of them correctly.
Changelog
no cl no fun