-
Notifications
You must be signed in to change notification settings - Fork 36
Test freedesktop trash implementation in container #144
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5305e8e
add container-based freedesktop trash tests
null-dev b2ce6e0
Add mount/symlink permutation tests
null-dev 4fbfe98
Only build freedesktop tests on Linux
null-dev d681e74
pr-comments: Fix typo in Cargo.toml
null-dev 71db0e7
Rename trash-helper to trash-test-helper
null-dev a3de0ec
pr-comments: Use CARGO_BIN_EXE_ to find trash-test-helper bin
null-dev 3c955ca
pr-comments: Copy binary into container instead of mounting it
null-dev a671dde
pr-comments: Ignore container-based tests by default
null-dev bd59662
pr-comments: Run container-based tests in serial
null-dev 2d6e170
Run in Linux cross CI using host docker socket mnt + cfg -> feat
null-dev 7848be9
Move funcs that operate on the container into struct
null-dev c7522e4
Document new CI step
null-dev df55dc0
Replace internal-only feature with alt approach
null-dev 24562ed
Remove useless bin decl
null-dev ecfc5af
Inline trash-test-helper lookup in TestContainer::start
null-dev 7bd1f3b
pr-comments: Move freedesktop helper to examples/trash
null-dev bee4e16
pr-comments: Undo --lib change to netbsd CI
null-dev efb46d4
docs: freedesktop_tests depends on trash binary
null-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /// Simple CLI that calls `trash::delete`. | ||
| /// | ||
| /// Usage: trash delete <path> | ||
| /// | ||
| /// Exits 0 on success, 1 on trash error, 2 on bad arguments. | ||
| /// | ||
| /// Note: This binary is used by the freedesktop_tests integration tests. | ||
| fn main() { | ||
| let args: Vec<String> = std::env::args().collect(); | ||
| if args.len() < 3 || args[1] != "delete" { | ||
| eprintln!("Usage: trash delete <path>"); | ||
| std::process::exit(2); | ||
| } | ||
| match trash::delete(&args[2]) { | ||
| Ok(()) => {} | ||
| Err(e) => { | ||
| eprintln!("Error: {e:?}"); | ||
| std::process::exit(1); | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call this
trashand put it intoexamples? I'd like to avoidsrc/binwhile it's used just for testing.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good idea, done! Just be aware that the
CARGO_BIN_EXE_trick Copilot mentioned here doesn't work with example bins so I had to go change that logic back to the manual detection approach.