[WIP] try isolating tests and allowing for unique package-specific tests #3378
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.
This PR explores an approach to supporting package-specific tests in PR builds, such as Cosmos DB's need for Emulator tests, and tests for the C bindings.
Changes includes:
Test-Package.ps1Test-Packagesto callTest-Packagein a loop in a SEPARATE pwsh process (thus isolating environment variables so that a package can freely set env vars in its setup without worrying about having to clean them up)Test-Additional.ps1script that a package can define to run additional tests after the main Rust tests. This isn't really different from just putting those tests inTest-Cleanup.ps1but it felt like a good idea to allow them to be separate.publishto an array of registries, allowing us to mark packages that should be treated as "public" but not actually published to crates.io (for example, theazure_data_cosmos_nativepackage, which represents production code that will eventually be GA, but isn't publishable to crates.io)