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

Switch BundleExtractToSpecificPath and BundleAndRun to using built test assets #92024

Merged

Conversation

elinor-fung
Copy link
Member

  • Make BundleExtractToSpecificPath and BundleAndRun tests use built test asset project (HelloWorld)
    • The BundleExtractToSpecificPath tests explicitly include mockcoreclr so that it will have native binaries to bundle
  • Remove redundant BundleAndRun.TestWith*Paths* tests
    • These were running a self-contained (not bundled) application by invoking it using relative / absolute paths, which does not seem particularly useful. There was no difference in how they bundled the application or ran the bundled application.
  • Move codesign check to BundlerConsistencyTests - trying to separate tests targeting the Bundler API from tests targeting single-file activation

Fixes #91039

The `TestWith*Paths` tests were just running a self-contained application by invoking
it using relative/absolute paths on the command line. There was no difference in what
it was doing for single-file.
@elinor-fung elinor-fung added test-enhancement Improvements of test source code area-Single-File labels Sep 13, 2023
@ghost ghost assigned elinor-fung Sep 13, 2023
@ghost
Copy link

ghost commented Sep 13, 2023

Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Make BundleExtractToSpecificPath and BundleAndRun tests use built test asset project (HelloWorld)
    • The BundleExtractToSpecificPath tests explicitly include mockcoreclr so that it will have native binaries to bundle
  • Remove redundant BundleAndRun.TestWith*Paths* tests
    • These were running a self-contained (not bundled) application by invoking it using relative / absolute paths, which does not seem particularly useful. There was no difference in how they bundled the application or ran the bundled application.
  • Move codesign check to BundlerConsistencyTests - trying to separate tests targeting the Bundler API from tests targeting single-file activation

Fixes #91039

Author: elinor-fung
Assignees: -
Labels:

test-enhancement, area-Single-File

Milestone: -

Copy link
Member

@vitek-karas vitek-karas 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 curious: Do we understand how it fixes the "No space left on the device" failure?

@elinor-fung
Copy link
Member Author

I believe it was simply because we were copying so much around - a full self-contained application copied for every test case and then each test case would generate a bundle. While we were cleaning up, it was only after all the test cases were run (explicitly cleaning up the copies after each test case would probably also have fixed it).

This change (and the others switching to use the pre-built assets / SingleFileTestApp) just gets rid of all those copies of the entire runtime, since it grabs the runtime files from the shared framework location instead of building/copying around a self-contained application to get the runtime files.

@elinor-fung elinor-fung merged commit 1bd6220 into dotnet:main Sep 14, 2023
@elinor-fung elinor-fung deleted the bundleExtractToSpecificPath-tests branch September 14, 2023 17:21
@ghost ghost locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Single-File test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Microsoft.NET.HostModel.Tests failing with "No space left on device"
2 participants